Reputation: 23
I have "Foreach" which output following Items:
"Factory Code": "XXXX",
"Factory Name": "XXXXXXXXXX",
"ERP Reference": "XXX",
It has items with spaces, I tried to get the item in the dynamic content with @{item().Factory Code}
However this is not possible as I have space in-between Factory and Code, I can't change the source system. how can I resolve this issue?
See below for the source data send it to foreach
{
"count": 527,
"value": [
{
"Factory Code": "xxxx",
"Factory Name": "xxxxx",
"ERP Reference": "xxxx",
"Factory Country": "xxxxx",
Upvotes: 0
Views: 792
Reputation: 11234
You can do it by giving the dynamic content as @item()['Factory Code']
inside ForEach.
Follow the below demonstration:
My sample json passed to ForEach using lookup:
[
{
"Factory Code": "Code1",
"Factory Name": "XXXXXXXXXX1",
"ERP Reference": "XXX1"
},
{
"Factory Code": "Code2",
"Factory Name": "XXXXXXXXXX2",
"ERP Reference": "XXX2"
},
{
"Factory Code": "Code3",
"Factory Name": "XXXXXXXXXX3",
"ERP Reference": "XXX3"
}
]
Inside ForEach I have used append variable activity to store the Factory Code
values.
Result stored in a variable after ForEach:
Upvotes: 1