Using JsonPath.Net, is it possible to write a single query that will obtain the values of properties with the same key at different nesting levels?
For example, from the following JSON:
{
"ObjA" : {
"textValue" : "a1",
"numValue" : 1
},
"ObjB" : {
"objArray": [
{
"textValue": "b1",
"numValue" : 1
},
{
"textValue": "b2",
"numValue" : 2
}
]
}
}
Can we get a list of all "textValue", i.e:
[
"a1",
"b1",
"b2"
]
Or all "numValue", i.e:
[
1,
1,
2
]
I have been trying to do this on https://json-everything.net/json-path/, but I can't figure out how.