Last Item
Get the last item from an array using lodash _.last
Return the final element of a JSON array.
**Highlights:**
- Uses lodash `_.last`
- Works with any data type
- Returns a JSON-formatted value
**Example:**
- Array: `["a", "b", "c"]`
- Result: `"c"`
API Documentation
Request Endpoint
POST /en/api/tools/last-item
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| array | textarea | Yes | Enter a JSON array |
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-last-item": {
"name": "last-item",
"description": "Get the last item from an array using lodash _.last",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=last-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]