Invert By
Invert keys grouped by values using lodash _.invertBy
Group keys by their values or by a transformed value.
**Highlights:**
- Uses lodash `_.invertBy`
- Groups keys into arrays
- Optional property path iteratee
**Example:**
- Object: `{"a":"x","b":"x","c":"y"}`
- Result: `{"x":["a","b"],"y":["c"]}`
API Documentation
Request Endpoint
POST /en/api/tools/invert-by
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| objectInput | textarea | Yes | Enter a JSON object |
| iterateePath | text | No | Optional property path for value transform |
Response Format
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}
Text:
Text
AI MCP Documentation
Add this tool to your MCP server configuration:
{
"mcpServers": {
"elysiatools-invert-by": {
"name": "invert-by",
"description": "Invert keys grouped by values using lodash _.invertBy",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=invert-by",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}
You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.
If you encounter any issues, please contact us at [email protected]