JSON Utilities

Get Values

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.

API Endpoint

GET /v1/json/values

Code Examples

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)

Use via MCP

Add to your AI agent

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"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What does JSON get values return for nested objects?

Returns all leaf values in a flat array, recursively extracting from nested objects and arrays while maintaining original data types.

How to extract JSON values in MCP-enabled editors?

Use the get_values tool in Cursor, Windsurf, or other MCP clients. Pass your JSON object and receive a clean array of all values.

Does get values preserve data types like numbers and booleans?

Yes, original data types are preserved. Numbers stay numeric, booleans remain true/false, strings stay quoted.

What happens with empty JSON objects or null values?

Empty objects return an empty array `[]`. Null values are included as `null` in the result array.

Can I get values from JSON arrays vs objects?

Works with both. Arrays return their elements directly, objects return all property values regardless of nesting depth.

Try Get Values Now

Get your free API key and start using Get Values in seconds.

Get Free API Key