having such a list:
[
[[[6781,"1"]], "a"],
[[[6782,"1"]], "b"],
[[[6780,"1"]], "c"]
]
which filter / query would you use to "partially flatten" the list to:
[
[6781,"1", "a"],
[6782,"1", "b"],
[6780,"1", "c"]
]
I tried this one, which is NOT working
- name: test
hosts: localhost
vars:
data: '[
[[[6781,"1"]], "a"],
[[[6782,"1"]], "b"],
[[[6780,"1"]], "c"]
]'
tasks:
- debug:
msg: "{{ data | from_json | flatten}}"