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.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
25 | |
24 | |
23 | |
23 | |
19 |
User | Count |
---|---|
58 | |
39 | |
38 | |
29 | |
26 |