OBJECTS_TO_CSV

Parses an array of objects with the same keys into CSV-formatted text. Headers are optional, if none are provided the keys of the first object are used.

Syntax 

OBJECTS_TO_CSV(objects, headers)

Usage examples 

Example 1

Input

1
{
2
"my_action": {
3
"objects": [
4
{
5
"age": 45,
6
"city": "Melbourne",
7
"name": "John Smith"
8
},
9
{
10
"age": 32,
11
"city": "Sydney",
12
"name": "Jane Doe"
13
},
14
{
15
"age": 27,
16
"city": "Brisbane",
17
"name": "Bob Jones"
18
}
19
]
20
}
21
}

Formula

OBJECTS_TO_CSV(my_action.objects)

Output

"name, age, city\nJohn Smith, 45, Melbourne\nJane Doe, 32, Sydney\nBob Jones, 27, Brisbane"

Sample Actions 

Transform
My Action
Transform
OBJECTS_TO_CSV

Select an action to inspect

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Was this helpful?