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
Name | Type | Description |
---|---|---|
Key | String | A 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) | Range | Target cell or range to write the resulting value into. |
Type (optional) | ValueType | Type 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) | Boolean | Specify 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
Type | Description |
---|---|
String | The last part of the key of the data value to be retrieved. |
Examples
Formula | Result | Comment |
---|---|---|
| [[42]] | Customer |
| #NA | Returns error code if customer name is not available because last parameter is to TRUE. |
| Read function with target range. | Example to read a whole table with the help of the DICTIONARY() function and a target range. |