Interactive JsonPath tutorial

Nested object Identifier-Index: .foo.bar

To fetch nested fields, you can do $.foo.bar.

Now your turn, try to get city name from the example below.

Input:
1{
2  "firstName": "Charles",
3  "lastName": "Doe",
4  "location": {
5    "city": "San Francisco",
6    "postal-code": "94103"
7  }
8}
JsonPath expression:
Expected:
1[
2  "San Francisco"
3]