Hi everybody!
I have a JSON structure like this:
raw_list= [
{ content: [
{ name: name1, prop: val1},
{ name: name2, prop: val2}
]},
{ content: [
{ name: name3, prop: val3}
]}
]
and I need to get from this arrays of names like this:
[ [name1, name2], [name3] ]
How can I achieve that?
If I leave only one element of the initial array, then I can filter it using
json_query(content[*].name)
I get one array ([name1, name2]), but I need an array of arrays. I tried to use
json_query([].content[].name)
but it doesn’t work, I get ampty variable
I would really appritiate any help!!!
Best Regards,
Ivan