Closed aymanabollo closed 10 months ago
Hi, I've a json string like the below, I need to check if array contains a specific value and I use this expression for this:
json.SelectTokens("$.name[?('Ahmad' in @.given )]")
but it seems like in keyword is not supported, I tried contains but also not working
in
contains
json.SelectTokens("$.name[?(@.given.contains('Ahmad') )]")
I need to do the filtering in the JSONPATH string not using LINQ, is this a bug or am I missing something?
"name": [ { "use": "official", "family": "Sayegh", "given": [ "Ahmad" ], "prefix": [ "Mr." ] }, { "use": "usual", "family": "الصايغ", "given": [ "أحمد" ] } ]
Thanks
Hi, I've a json string like the below, I need to check if array contains a specific value and I use this expression for this:
json.SelectTokens("$.name[?('Ahmad' in @.given )]")
but it seems like
in
keyword is not supported, I triedcontains
but also not workingjson.SelectTokens("$.name[?(@.given.contains('Ahmad') )]")
I need to do the filtering in the JSONPATH string not using LINQ, is this a bug or am I missing something?
Thanks