Closed mgdemers closed 1 year ago
@mgdemers I think that the problem in your query are the spaces and in your last example you're missing a .0
at the end, with:
outer.[middle,!null].0.#.[inner,!null].[0.#.key,!null].0
I get
[null,["value","value2"],["value3"],null]
That I believe is what you're looking for.
Thanks @volans- , removing the spaces was what I needed.
I am looking to retrieve values from a nested array that may not always be present, and preserve the array ordering in the result.
Example JSON:
Ideally, I want to get something like this output:
Based on comments in #295, I've tried a few variations of queries with defaults defined, but the
null
or omitted keys are still dropped from the results:The closest I've come is here, where the general structure is still defined, but technically wrapped in one extra layer of brackets:
Any ideas for how I can preserve the empty & missing arrays is greatly appreciated!