Nth Item
Get the item at a specific index using lodash _.nth
Return the item at a specific index in the array.
**Highlights:**
- Uses lodash `_.nth`
- Supports negative indices (counting from the end)
- Returns a JSON-formatted value
**Example:**
- Array: `["a", "b", "c", "d"]`
- Index: `-1`
- Result: `"d"`
API Documentation
Request Endpoint
POST /en/api/tools/nth-item
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| array | textarea | Yes | Enter a JSON array |
| index | number | No | Zero-based index (negative counts from the end) |
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-nth-item": {
"name": "nth-item",
"description": "Get the item at a specific index using lodash _.nth",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=nth-item",
"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]