Hi Everyone,
I have an array and want to get the data from "Values", the scope in the original data is {[{[[ ]]}]} and I want to get the "Values" to be [[ ]], is there has a way to get this result, I tried below expression can't work:
body('XXXX')?['Value']?['Values']
Original Array show as below:
{
"value": [
{
"@odata.id": "/sites('XXXXXXXXXX-3b1-4e61-XXX-38e67de76b90%XXXafd0-7869-466-9b70-XXXXXXXXXXX')/lists('XXXXXXXX-XXXXXX1Xb')/drive/items('05XAKKXXXXXXXXXFQ6XXXX7TK')/workbook/tables(%8XXXX-4F3-BBAC-9XXX9XXXXXX%7D%7)/rows/itemAt(index=0)",
"index": 0,
"values": [
[
4378,
43780,
"",
"",
"",
4373,
"K/B"
]
]
}
]
}
Final, I want the array to be displayed as below:
[
[
4378,
43780,
"",
"",
"",
4373,
"K/B"
]
]
Can anyone have a suggestion? Thank you very much.
Regards,
ilu989
Finally, I find a way to approach what I need, use "Select" to treat outputs and set the expression for example as below:
Thanks for your guide to let me finish this!!
{
"0": @{item()?['values'][0][0]},
"1": @{item()?['values'][0][1]},
"2": @{item()?['values'][0][2]},
"3": @{item()?['values'][0][3]}
}
The output will display be:
Regards,
ilu989
Hi @v-alzhan-msft ,
Finally, I find a way to approach what I need, use "Select" to treat outputs and set the expression for example as below:
Thanks for your guide to let me finish this!!
{
"0": @{item()?['values'][0][0]},
"1": @{item()?['values'][0][1]},
"2": @{item()?['values'][0][2]},
"3": @{item()?['values'][0][3]}
}
The output will display be:
Regards,
ilu989
Hi @v-alzhan-msft ,
Thanks for your response, because the array is created by the Flow's step automatically, so I can't remove the character "@"
Below are my Flow's outputs, is there has some expression can avoid the head of @?
Regards,
ilu989
Hi @ilu989 ,
Please take a try with expression below:
body('XXXX')?['value'][0]['values']
I have made a test on my side and could I'm couldn't create an object for the data that you provided:
If I remove the @ symbol from the data,then you could refer to screenshot to create the flow:
The expression in the Compose as below:
variables('test')?['value'][0]['values']
The flow would run successfully as below:
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.