You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to find "Things" that descend from my parent structure regardless of where they are. "Things" are characterized by containing a thing_type field. To accomplish this, I use the JSONPath $..*[?(@.thing_type)]. jsonpath.com confirms that this works with the sample data below (one match found, as expected):
This doesn't appear to be a bug to me. $..*[?(@.thing_type)] refers to any element of an array which contains an object with the property thing_type. In the case of the example data, thing_type is a nested property.
The path $..*[?(@..thing_type)] (note the extra dot) correctly returns a match.
I want to find "Things" that descend from my parent structure regardless of where they are. "Things" are characterized by containing a
thing_type
field. To accomplish this, I use the JSONPath$..*[?(@.thing_type)]
. jsonpath.com confirms that this works with the sample data below (one match found, as expected):However, jsonpath-ng 1.5.3 fails to find this match:
The above code prints
0
instead of the expected1
.The text was updated successfully, but these errors were encountered: