Skip to main content
Version: Streamsheets 3.0

READ

Reads the values from a JSON object using the given key. Mainly used to read inbox payloads.

Syntax

=READ(Key, [TargetCell or Range], [Type], [Direction], [ErrorOnMissing])

Arguments

NameTypeDescription
KeyStringA key to a data item, that should be read. The key is usually created by using utility functions like INBOXDATA, INBOXMETADATA, OUTBOXMETADATA or OUTBOXDATA. The key consists of the path to the item within the JSON object. Each path element is surrounded by brackets, Depending on the used utility function, you can retrieve data from different sources (e.g. Inbox or Outbox).
TargetCell or Range (optional)RangeTarget cell or range to write the resulting value into.
Type (optional)ValueTypeType of Value. Allowed types are String, Number, Bool/Boolean, Array, Dictionary, Json or Jsonroot. The type defines the color of the target cell.

Options:
"String"
"Number"
"Boolean"
"Array"
"Dictionary"
"Json"
"JsonRoot"

Default value: "Json"
Direction (optional)BooleanSpecify TRUE to align keys vertically for type ARRAY, JSON or JSONROOT and horizontally for type DICTIONARY or RANGE.

Default value: TRUE
ErrorOnMissing (optional)If this is set to TRUE #NA! will be returned if no data is available. If set to FALSE last read value will be returned or a default value if none was read before. Drag&Drop automatically sets TRUE.

Default value: FALSE

Return

TypeDescription
StringThe last part of the key of the data value to be retrieved.

Examples

FormulaResultComment
=READ(INBOXDATA(“”, “”, “Customer”), B1, “String”)
[[42]]Customer
=READ(INBOXDATA(“”, “”, “Customer”, “Name”), C2, “String”,,TRUE)
#NAReturns error code if customer name is not available because last parameter is to TRUE.
=READ(INBOXDATA(,,”Products”,”0”), F19:J25,”Dictionary”,,TRUE)
Read function with target range.Example to read a whole table with the help of the DICTIONARY() function and a target range.