Hello -
I'm trying to use a data action to consume an API that returns a collection of objects. I need to reference specific elements of those collections within an Architect flow. I've looked at examples on how to do this, but can't seem to get it right.
The output of my API (for simplicity's sake) is:
[
{
"name": "name1",
"description": "description1"
},
{
"name": "name2",
"description": "description2"
},
]
My response config is:
{
"translationMap": {
"product": "$[*]"
},
"translationMapDefaults": {},
"successTemplate": "{ \"products\" : ${product} }"
}
My output contract is:
{
"type": "object",
"properties": {
"products.name": {
"title": "names",
"type": "array"
},
"products.description": {
"title": "descriptions",
"type": "array"
}
},
"additionalProperties": true
}
I have "flatten input" turned on. When I test it, it returns:
{
"products.name": [
"name1",
"name2"
],
"products.description": [
"description1",
"description2"
]
}
Yet, when I use that data action within an Architect flow, and set the outputs to Task.names and Task.descriptions, then try to Play Audio on the expression ToAudioTTS(Task.names[0]), the flow quits unexpectedly.
Any help would be greatly appreciated. I can't tell if I'm close or miles away 