Recursive descent operator not working
Closed this issue · 5 comments
I can't get ..ident
(for non-child keys) to work from the report screen.
Could you describe the problem in more detail?
@texastoland This question is jora (query language) related.
Operator ..
works this way:
- Apply subquery (on the right side) to a value (on the left)
- For each item of result in step 1 (it may be multiple because of array) never seen before apply step 1
- If all returned by subquery values already seen – return a result of unique values
In your case, at first iteration version
applies to the top level object and returns a string. Ar second iteration it applies to the string and returns undefined -> return a result.
In case you want to get dependency tree in package-lock.json as a list, you should use something like that:
..(dependencies.values())
But you will loose packages names. Fix that:
..(dependencies.entries().({ name: key, ...value }))
Hope it helps.
Closing since it's not a bug.
...to find a version at any depth. Is there something equivalent?
It's possible with jora, but there is no special operator for this. Something like this:
..values().[version].version
What's your use case? I did not feel the need for this functionality in my tasks.
You could open an issue with a discussion in jora issues.