Want to convert json output to array or list using Powershell.
I have tried converting the output using ConvertFrom-Json
, then fetching the key Name and Values. Need suggestion.
json Output:
{
"demo1": {
"type": [
"tuple",
[
[
"list",
"string"
],
[
"list",
"string"
]
]
],
"value": [
[
"123"
],
[
"456"
]
]
},
"demo2": {
"type": [
"tuple",
[
"string",
"string"
]
],
"value": [
"abc",
"xyz"
]
}
}
Using Powershell want to convert it as below:
demo1 = [["123"],["456"]]
demo2 = ["abc","xyz"]
Thanks in advance.