DOT Notation
Usually, references only reference a cell or cell range. The DOT notation goes one step further. It allows breaking down hierarchies and references to objects, which usually are not directly reachable. These hierarchies can be part of a JSON object, like messages in the inbox or values from shapes.
Usage
Using the DOT notation is very simple. Just combine the different levels of a JSON hirarchy into a list separated by dots. This way the reference knows where to locate your searched data.
Cell level
To work with the DOT notation on the cell level, it is necessary to have a JSON object inserted in a cell. There are multiple ways this could happen.
Via a query: Use the target parameter of a query on only one cell and the response will be pasted into the cell as a JSON object. Via function: JSON() is a function, which creates JSON objects.
Reference the cell with the JSON object in position one. Now add the hierarchy level until you reach the parameter.
Example:
In cell A1 a pure STRING, but already a JSON notation:
{"level1":{"level2":{"parameter1":12,"parameter2":31}}}
To get the value 12 as a result, use =JSON(A1) in A2. Now you can reference A2 and use the DOT notation to get to the value of "parameter1".
=A2.”level1”.”level2”.”parameter1”
Inbox & Outbox
Besides using JSON objects in a cell, it is possible to directly link the in- & outbox to a cell.
Example: In the inbox, the following message arrived:
=INBOXDATA.0."sensorid"
This DOT notation will again result in "S1". Another syntax in this context:
INBOX
INBOXDATA
INBOXMETADATA
OUTBOX
OUTBOXDATA
OUTBOXMETADATA
Shapes
Another very powerful application of the DOT notation is using it to identify shape content. Use the name set in the “General” tab of your shape settings and enter:
=Name.”VALUE”
Other possible parameter are: X, Y, W (Width), H (Height), ROTATION, VISIBLE, VALUE, NAME
=Name.”X”
Loop
The Loop element from your inbox uses the DOT notation to point to a certain hierarchy level to loop over.
Example:
Data.test.0
It is set in the Inbox advanced settings, or you can skip the DOT notation alltogether by right-clicking on a payload element.