newtonsoft version 13.0.1
given the object data which is a JToken with the content of:
{
"myString": "demo2",
"myNumber": 2.2,
"myInteger": 20,
"myObject": {
"myObject": {
"myArray": [
2,
20,
200,
2000
]
},
"myArray": [
2,
20,
200,
2000
]
},
"myArray": [
2,
20,
200,
2000
],
"myBoolean": true,
"myNull": null
}
and the selecttokens command like this.
data.SelectTokens("$..myObject[?(@.myArray)]")
I expect to get one object back. but it doesn't return any. Is there something I do wrong here?
if I try it on https://jsonpath.com/ it will return me an object.
or should I test it like $..[?(@.myObject.myArray)]