I have a dynamic list from a JSON file that I need to convert. Thanks to the setup I will always get the following output format, but I cannot be certain of the order of the list, just the contents.
[
{"#text": "Foo"
"@Name": "Bar"}
{"#text": "Woo"
"@Name": "Tar"}
{"#text": "Fuu"
"@Name": "Bear"}
]
And I would love to end up with:
{"Foo": "Bar", "Woo": "Tar", "Fuu": "Bear"}
I have tried to use mv-expand, however, I am not able to collect the columns as they are called #text and @Name, meaning that they are invalid to use in a query. I am very new to this language and haven't been able to find anything matching my problem.