
gpyyl (gpyyl) asked a question.
Hi Team,
I'm having a bit of trouble working with lists and building a single string output from a Table - Search Rows.
I have 'Table -Search Rows' return a list of objects with the format '{ "Countries": "AU, IT, XX..." } which I am trying to convert to the locations array for Managing Network Zones e.g.
` [{
"country": "AU",
"region": null
},{ "country": "IT",
"region": null
}, { "country": "XX",
"region": null
}]`
I have tried just about every combination of Object.ForEach, List.ForEach, Object.Map, Text.Compose and others I can think of and I cannot work out how to take the 'Rows' and convert to the above. I'm sure I'm just misunderstanding how to use one of these functions but any guidance wo

I just realized I probably need to elaborate a bit as this is a POC and not a completed design. The first card in the Parent flow is a "Search Rows" This will return a list of rows. In a completed flow this would immediately be passed into a "For Each" type card to then be processed one level lower in the first Helper flow. Since this was just a test I leverage two flows and took a short-cut to remove the need of the third flow by using an Object-Get with a path of (zero position, dot, key name) which will provide the value of a fixed row (the first one since zero position was used).
So a "completed flow would be:
1) Search table rows > pass to foreach
2) Helper that would process each row from the table, split the CSV, pass into reduce
3) Helper that would do the reduce processing and return the final results to flow 2
Flow 2 would be treated as the "Main" flow since flow 1 (the parent) would only be there for the initial data pull, no data can be passed back up to it since it is leveraging a for each.