Categories

JSON Value Extractor

Extract values from JSON objects using JSONPath expressions. Perfect for extracting specific data from complex nested JSON structures, API responses, and configuration files.

JSONPath expressions to extract values. Examples: $.* - All values $.users[*].name - All user names $.data.items[*].price - All item prices Leave empty to extract all values

Include the full path to each extracted value

Flatten extracted arrays into individual values

Maintain the original order of values in the JSON

Include null values in the extraction results

Key Facts

Category
Data Processing
Input Types
textarea, select, checkbox
Output Type
text
Sample Coverage
4
API Ready
Yes

Overview

The JSON Value Extractor is a powerful utility designed to parse complex JSON data and retrieve specific values using standard JSONPath expressions. It simplifies data transformation by allowing you to target nested fields within large API responses or configuration files with precision.

When to Use

  • When you need to isolate specific data points from large, deeply nested JSON API responses.
  • When you are cleaning or filtering configuration files to extract only the necessary parameters.
  • When you need to convert raw JSON data into a structured format like CSV or XML for further analysis.

How It Works

  • Paste your raw JSON data into the input field.
  • Define your target data using standard JSONPath expressions (e.g., $.users[*].email).
  • Select your preferred output format, such as a simple list, JSON array, or CSV.
  • Adjust settings like flattening arrays or including path information to refine your results.

Use Cases

Extracting user email addresses from a large list of customer records in a JSON API response.
Pulling specific configuration settings from a complex environment file to use in a deployment script.
Converting nested JSON product data into a flat CSV file for import into spreadsheet software.

Examples

1. Extracting User Emails

Developer
Background
You have a large JSON response containing a list of users with various metadata.
Problem
You need a clean list of just the email addresses for a mailing list.
How to Use
Paste the JSON into the input and use the expression '$.users[*].email'.
Example Config
Output Format: List, Flatten Arrays: Enabled
Outcome
A clean, newline-separated list of all email addresses found in the JSON.

2. Parsing API Product Prices

Data Analyst
Background
An API response provides a nested structure of product categories, items, and their respective prices.
Problem
You need to extract all price values to calculate the average cost of inventory.
How to Use
Use the JSONPath expression '$.data.items[*].price' to target the price fields.
Example Config
Output Format: CSV, Flatten Arrays: Enabled
Outcome
A CSV-formatted list of prices ready for import into Excel or Google Sheets.

Try with Samples

json

Related Hubs

FAQ

What is JSONPath?

JSONPath is a query language for JSON, similar to XPath for XML, used to navigate and extract specific parts of a JSON document.

Can I extract multiple values at once?

Yes, you can enter multiple JSONPath expressions, one per line, to extract different fields simultaneously.

What output formats are supported?

The tool supports outputting results as a simple list, a JSON array, CSV, or XML format.

Does the tool handle nested arrays?

Yes, you can use the 'Flatten Array Results' option to simplify nested arrays into a flat list of values.

Is my data stored on your server?

No, all processing is performed locally in your browser to ensure your data remains private and secure.

API Documentation

Request Endpoint

POST /en/api/tools/json-path-extractor

Request Parameters

Parameter Name Type Required Description
jsonInput textarea Yes -
jsonPaths textarea No JSONPath expressions to extract values. Examples: $.* - All values $.users[*].name - All user names $.data.items[*].price - All item prices Leave empty to extract all values
outputFormat select Yes -
includePaths checkbox No Include the full path to each extracted value
flattenArrays checkbox No Flatten extracted arrays into individual values
preserveOrder checkbox No Maintain the original order of values in the JSON
nullValues checkbox No Include null values in the extraction results

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-json-path-extractor": {
      "name": "json-path-extractor",
      "description": "Extract values from JSON objects using JSONPath expressions. Perfect for extracting specific data from complex nested JSON structures, API responses, and configuration files.",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=json-path-extractor",
      "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]