I have following JSON
{
"firstName": "John",
"lastName" : "doe",
"age" : 26,
"address" : {
"streetAddress": "naist street",
"city" : "Nara",
"postalCode" : "630-0192"
},
"phoneNumbers": [
{
"type" : "iPhone",
"number": "0123-4567-8888"
},
{
"type" : "home",
"number": "0123-4567-8910"
}
]
}
and $.phoneNumbers[:1].type
json path to extract phone number type iPhone
value but the output is
[
"iPhone"
]
I would like to get it as simple string like iPhone
. How do i create the JSON path to strip double quote "
and [
?