Invert Object
Invert keys and values using lodash _.invert
Swap keys and values in an object.
**Highlights:**
- Uses lodash `_.invert`
- Values become string keys
- Later values overwrite earlier keys
**Example:**
- Object: `{"a":"x","b":"y"}`
- Result: `{"x":"a","y":"b"}`
API Documentation
Request Endpoint
POST /en/api/tools/invert-object
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| objectInput | textarea | Yes | Enter a JSON object |
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-object": {
"name": "invert-object",
"description": "Invert keys and values using lodash _.invert",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=invert-object",
"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]