Extracts all values from a JSON object into a flat array, ignoring keys and structure. Use via MCP in Cursor or Windsurf, or call GET /v1/json/values directly. Pass `{"name": "John", "age": 30, "active": true}` and get `["John", 30, true]`. Preserves original data types and order.
curl "https://tinyfn.io/v1/json/values" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/json/values', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/json/values',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's json tools:
{
"mcpServers": {
"tinyfn-json": {
"url": "https://tinyfn.io/mcp/json",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Returns all leaf values in a flat array, recursively extracting from nested objects and arrays while maintaining original data types.
Use the get_values tool in Cursor, Windsurf, or other MCP clients. Pass your JSON object and receive a clean array of all values.
Yes, original data types are preserved. Numbers stay numeric, booleans remain true/false, strings stay quoted.
Empty objects return an empty array `[]`. Null values are included as `null` in the result array.
Works with both. Arrays return their elements directly, objects return all property values regardless of nesting depth.