Skip to main content
Version: Streamsheets 3.0

JSON.PROCESS

Premium

Traverses given JSON object and processes each cell in specified cell-range. Before the cell-range is processed the current JSON value is written to defined value cell, whereas the corresponding key is returned from the function itself. A nested JSON can be completely traversed by setting the optional recursive parameter to TRUE. To immediately stop the JSON traversal use BREAK() in processed cell-range.

Syntax

=JSON.PROCESS(JSON, ValueCell, CellRange, [Recursive])

Arguments

NameTypeDescription
JSONJSONA JSON object to process.
ValueCellCellCell-reference to write current JSON value to.
CellRangeRangeCell-range to process for each JSON value.
Recursive (optional)BooleanSpecify TRUE to completely traverse a nested JSON object.

Default value: FALSE

Return

TypeDescription
String or ErrorCurrently processed JSON key or an error value.

Examples

Traverse simple JSON and process specified cell-range:

A
1{"name": "foo", "age": 42 }
2=CONCAT(A2, A4, "-")
3=CONCAT(A3, B3, "-")
FormulaResultComment
=JSON.PROCESS(JSON(A1), B3, A2:A3)
ageProcesses given cell-range for each JSON key-value pair. When finished A2 contains all the keys (-name-age-) and A3 all the corresponding values (-foo-42-)