JSON Query Playground

// Query and extract data from JSON using JSONPath expressions

JSONPath Query Expression
Input JSON
Query Result

No matches to display

Execute a JSONPath query to extract and inspect individual matches.

How to Use JSON Query Playground

Interactive Guide

Write queries to search, filter, and explore your JSON data. Start with simple field matching and gradually build more powerful nested and recursive queries.

1. Paste JSON

Provide any JSON payload, API response, or nested structure in the left editor.

2. Write Query

Use standard JSONPath syntax with dot notation, array indexes, or filter expressions.

3. Extract & Inspect

Inspect matched items with precise path locations, type badges, and item counts.

A basic query accesses properties directly using dot notation or array brackets. The symbol $ represents the root document.

SAMPLE USERS JSON
{
  "users": [
    {
      "id": 1,
      "name": "John",
      "age": 25,
      "role": "developer"
    },
    {
      "id": 2,
      "name": "Jane",
      "age": 30,
      "role": "designer"
    }
  ]
}
1. Extract All User Names
$.users[*].name

Searches the users array and extracts each user's name.

Output:["John", "Jane"]
2. Access First Array Item
$.users[0]

Accesses only the first user object at index 0.

Output:{ "id": 1, "name": "John", ... }

Click Load on any card to populate both the sample JSON and query expression directly into the playground editor above:

Simple Field MatchBeginner

Extract all user names from an array of objects.

$.users[*].name
Out:["John", "Jane"]
Number ComparisonBeginner

Filter users who are older than 25.

$.users[?(@.age > 25)].name
Out:["Jane"]
Multiple Conditions (AND)Intermediate

Find users who are developers AND at least 20 years old.

$.users[?(@.role == 'developer' && @.age >= 20)].name
Out:["John"]
Nested Property QueryIntermediate

Query deeply nested profile locations across user objects.

$.users[*].profile.location.city
Out:["Surat", "Mumbai"]
Array Slicing & ExtractionIntermediate

Extract the first 2 items of an array using slice notation.

$.products[0:2].name
Out:["Pro Gaming Laptop", "Wireless Mouse"]
Complex E-Commerce FilterAdvanced

Filter in-stock electronics under budget and extract names.

$.products[?(@.category == 'Electronics' && @.inStock == true && @.price <= 80000)].name
Out:["Pro Gaming Laptop"]
Deep Recursive SearchAdvanced

Find all "skills" arrays anywhere in the organization tree.

$..skills
Out:[["React", "TypeScript"]]