With this json:
{
"firstName": "John",
"lastName" : "doe",
"age" : 26,
"address" : {
"streetAddress": "naist street",
"city" : "Nara",
"postalCode" : "630-0192"
},
"phoneNumbers": [
{
"type" : "iPhone",
"number": "0123-4567-8888",
"other" : "value"
},
{
"type" : "home",
"number": "0123-4567-8910",
"other" : "value"
}
]
}
A query like this: $.phoneNumbers.[type,number] returns:
[
"iPhone",
"0123-4567-8888",
"home",
"0123-4567-8910"
]
It would be very helpful if there is an option to make the result as this:
[
{"type": "IPhone", "number": "0123-4567-8888"},
{"type": "home", "number": "0123-4567-8910"}
]
With this json:
{ "firstName": "John", "lastName" : "doe", "age" : 26, "address" : { "streetAddress": "naist street", "city" : "Nara", "postalCode" : "630-0192" }, "phoneNumbers": [ { "type" : "iPhone", "number": "0123-4567-8888", "other" : "value" }, { "type" : "home", "number": "0123-4567-8910", "other" : "value" } ] }A query like this:
$.phoneNumbers.[type,number]returns:It would be very helpful if there is an option to make the result as this:
[ {"type": "IPhone", "number": "0123-4567-8888"}, {"type": "home", "number": "0123-4567-8910"} ]