COMBINE_COLUMNS_AND_ROWS

Combines labeled columnar data into a list of objects. Useful for processing data returned from APIs like Snowflake, Databricks, or Google Sheets.

Syntax 

COMBINE_COLUMNS_AND_ROWS(columns, rows)

Usage examples 

Example 1

Input

1
{
2
"cols": [
3
"Name",
4
"Age"
5
],
6
"rows": [
7
[
8
"Alice",
9
35
10
],
11
[
12
"Bob",
13
51
14
]
15
]
16
}

Formula

COMBINE_COLUMNS_AND_ROWS(cols, rows)

Output

1
[
2
{
3
"name": "Alice",
4
"age": 35
5
},
6
{
7
"name": "Bob",
8
"age": 51
9
}
10
]
Was this helpful?