Skip to main content
Version: Streamsheets 2.5

JSON.PROCESS

star This is a premium feature.

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

NameDescription
JSONA JSON object to process.
ValueCellCell-reference to write current JSON value to.
CellRangeCell-range to process for each JSON value.
Recursive (optional)Specify TRUE to completely traverse a nested JSON object. Defaults to FALSE.

Return

Currently processed JSON key or an error value.

Examples

Traverse simple JSON and process specified cell-range:

A1: {"name": "foo", "age": 42 } 
A2: =CONCAT(A2, A4, "-")
A3: =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-)