Hi All,
I have the below array which I want to convert in an Object.
{
"values": [
[
"Header1",
"Header2"
],
[
"Value1",
"Value2"
],
[
"Value11",
"Value22"
]
]
}
My desired output is
{
[
"Header1":"Value1",
"Header2":"Value2",
],
[
"Header1":"Value11",
"Header2":"Value22",
]
}
Any help would be appreciated.
Solved! Go to Solution.
That's a very peculiar looking array of arrays! An array of objects would be easier, saying that, this is possible with a select.
From: range(1,add(length(outputs('Compose')?['values']),-1))
which is basically skip integer 0 (the header) and run til length of values array minus 1
keys are:
and converted it as requested....
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉
That's a very peculiar looking array of arrays! An array of objects would be easier, saying that, this is possible with a select.
From: range(1,add(length(outputs('Compose')?['values']),-1))
which is basically skip integer 0 (the header) and run til length of values array minus 1
keys are:
and converted it as requested....
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉
Thank you so much. This was really helpful.