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
When running a filter on an object instead of an array, the @parent property does not seem to point at the actual parent object, but at the parent of the parent.
It's easy to imagine where this comes from, since when using this filter on an array of objects, you'd have to go 2 levels up in order to get to the parent object instead of the array. This is however not the case when filtering over the entries of an object.
Code sample or steps to reproduce
I ran the following JSONPath in the browser demo. As you can see I put a console.log statement in the filter to monitor the values of @, @path, @parentProperty and @parent while it is running
Describe the bug
When running a filter on an object instead of an array, the
@parent
property does not seem to point at the actual parent object, but at the parent of the parent.It's easy to imagine where this comes from, since when using this filter on an array of objects, you'd have to go 2 levels up in order to get to the parent object instead of the array. This is however not the case when filtering over the entries of an object.
Code sample or steps to reproduce
I ran the following JSONPath in the browser demo. As you can see I put a console.log statement in the filter to monitor the values of @, @path, @parentProperty and @parent while it is running
with the following JSON:
Console error or logs
The console will show the following log:
i.e. the @parent is not pointing to the object with id 3 as expected, but to it's parent.
Note that the @path and @parentProperty variables are set correctly. Only the @parent property is wrong.
Expected behavior
I would expect the following to be logged instead:
Environment (IMPORTANT)
Desktop**
The text was updated successfully, but these errors were encountered: