Collection Outputs - Indexing output

(Andrew Catchpole) #1

In Data Outputs it states: “To get the second item, you’d use {{task.data__tags__1__id}}, and so on. It’s also possible to treat any item in an array as a Flow XO collection output.”

In order to increment through the JSON output is it possible to use an attribute as the index?
e.g. {{task.data__tags_index_id}

The Collections Cheat Sheet does not appear to help either.

Thanks Andrew

https://support.flowxo.com/article/143-data-outputs
https://support.flowxo.com/article/129-collections

Collections Cheat Sheet
To quickly remind yourself of the options available with collections, here are all the options:

{{ output 1 }} - use the first item (same as {{ output }})
{{ output 5 }} - use the 5th item
{{ output n }} - use the last item
{{ output = }} - sum of all values
{{ output # }} - count of all values
{{ output & }} - space separated list of all values
{{ output && }} - formatted list of all values
{{ output * }} - Magic Repeat

Magic Repeater & Cards on Messenger Bot
(John Jackson) #2

Thanks for all your contributions on the community site recently! Unfortunately, it’s not possible to use an attribute/output as an index like this. :disappointed:

(Andrew Catchpole) #3

@johnjackson I appreciate that you receive loads of requests however please consider this for further developments of the platform. Thank you for your response.

1 Like