---
title: "JSONPath examples"
canonical: "https://support.appfire.com/space/EI4J/11206873/JSONPath%20examples"
format: markdown
---
> Macro (aura-html)

JSONPath is a powerful query language for navigating and extracting data from JSON documents. This guide provides practical examples to help you understand how to use JSONPath effectively.

> ⚠️ Note that the JSONPath implementation uses [Groovy's GPath](http://groovy-lang.org/processing-xml.html#_gpath) syntax and is not to be confused with Jayway's [JsonPath](https://github.com/jayway/JsonPath) implementation.

## Sample JSON data

Let's consider the following JSON response:

```groovy
{"store": 
[  
	{
		"title": "Book One",
		"price": 23
	},
  	{
		"title": "Book Two",
		"price": 34
	},
  	{
		"title": "Book Three",
		"price": 45
	},
  	{
		"title": "Book Four",
		"price": 56
	}
]
} 
```

## JSONPath expressions and results

The following table demonstrates JSONPath expressions and their corresponding results for the example JSON data:

| **JSONPath** | **Result** |
| --- | --- |
| `store.size()` | 4 |
| `store[0].title` | Book One |
| `store[2].title` | Book Three |
| `store.findAll { it.price > 50 }.title[0]` | Book Four |
| `store.find { it.name == 'Book Three' }.price` | 45 |
| `store.collect { it.price }.sum()` | 158 (which is 23 + 34 + 45 + 56) |