visch
09/27/2022, 6:45 PM.
notation.
You can use single / double quotes just like with dicts in python.
So if you had a json object that looks like https://jsonpath.com/ is a great place to test
{
"firstName": "John",
"lastName": "doe",
"age": 26,
"address": {
"streetAddress": "naist street",
"city": "Nara",
"postalCode": "630-0192"
},
"phoneNumbers": [
{
"type": "iPhone",
"number": "<tel:0123-4567-8888|0123-4567-8888>"
},
{
"type": "home",
"number": "<tel:0123-4567-8910|0123-4567-8910>"
}
]
}
You could list all phone numbers by going $.phoneNumbers[*]
, or you could write $['phoneNumbers'][*]
I find the second one easier to read but that's probably just me 🤷