Writes the content of given json to a specified cell range. It is recommended, but not a mandatory, to encode passed json with either array, dictionary, range or the json function itself. For better results the encoding type and direction parameters can be specified. Please refer to JSON.VALUE if only a single json value should be extracted.


=JSON.RANGE(JSON, TargetRange [, Type, Direction])


JSONA json object which data will be writen to specified target range.
TargetRangeA cell range to write json data to. If the range size covers only one cell, it will be automatically increased to match content of given json.
TypeOptional. A text which describes the function used for encoding. Should be one of ARRAY, DICTIONARY, JSON, JSONROOT or RANGE. Note: the difference beteween JSON and JSONROOT is that JSON traverses the complete json while JSONROOT stops after first level. Defaults to JSON.
DirectionOptional. Specify TRUE to align keys vertically for type ARRAY, JSON or JSONROOT and horizontally for type DICTIONARY or RANGE. Note that the result might depends on the direction used to encode given json. Defaults to TRUE.

Return Value

TRUE, if no error occurred, otherwise an error value.

Example Below examples assumes following SourceRange:

=JSON.RANGE(ARRAY(A1:B2),A5:B6,”ARRAY”)Results in:
A5=”v1”, B5=”23”
A6=”v1”, B6=”42”
A5=”v1”, B5=”23”
A6=”v1”, B6=”42”
=JSON.RANGE(JSON(A1:B2),A5:B6,FALSE)Results in:
A5=”v1”, B5=”v2” A6=”23”,
A5=”v1”, B5=”v2”
A6=”23”, B6=”42”