There is a list of dictionaries as shown below:
"test_list_of_dicts": [
{
"inner_dict":[
{"f1":"a","f2":"b"},
{"f1":"c","f2":"d"}
],
"id":"id1"
},
{
"inner_dict":[
{"f1":"e","f2":"f"},
{"f1":"g","f2":"h"}
],
"id":"id2"
}
]
I need to modify above structure and get a new list of dicts like below:
"new_list_of_dicts": [
{"f1":"a","f2":"b","id":"id1"},
{"f1":"c","f2":"d","id":"id1"},
{"f1":"e","f2":"f","id":"id2"},
{"f1":"g","f2":"h","id":"id2"}
]
I couldn't find a way to achieve this in Ansible.