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
JSONPath basically collects values that are already in the original JSON document, it doesn't create new values, and as the last step, it appends all the values that it has collected into a result array. In JSONPath, the index operator can only be applied to items that are already arrays in the original JSON document, e.g., $.books[0]. The result array isn't created until all querying is done, it can't itself be queried against.
By contrast, there are other JSON query languages that do support the creation of new arrays as intermediate values, and these can be queried against. For example, the JMESPath expression
Hello,
$.books[[email protected]>22]
will return an book array:$.books[[email protected]>22][0]
will retrun an empty array[]
Many people think
$.books[[email protected]>22][0]
should return a book:It looks like this problem affects all similar libraries - example
The text was updated successfully, but these errors were encountered: