Skip to content

Get Value from JSON Object

This block uses JSON data format. If you don't know what JSON is take a look at What is JSON?

The Get Value from JSON Object task block consists of an input and a done output.


If the input to the Get Value from JSON Object is triggered the block will read the JSON value in the first entry it will use the key to locate the key value pair and will put the value for that key into the variable specified by the third entry. If the key doesn't exist the block will put an empty text into the variable specified by the third entry.

Examples

Here is a simple example of a mission that uses a Get Value from JSON Object. This example first creates a variable named var1 and places a JSON object into it. Next, the Get Value from JSON Object block searches for the key in the JSON array in var1 and puts the value of that key into the variable var2. Then the value of var2 is written to the mission log.


Copy / Settings / Docs

Each task block has three buttons named Copy, Settings, and Help.

  • Copy: This will duplicate the task block with all the current settings.
  • Settings: Settings will show a dialog that allows some added configuration for the block
    • Note: This allows you to add a text note for the current block. This note will appear in the log file if the Block Loggin option is enabled.
    • Transition Out Time: Each block can specify a delay in milliseconds that it will wait after an output trigger is activated. This feature is generally not used but is avilable for more granular flow control of the mission if needed.
    • Block Logging: If this is enabled then the internal logging of the block is turned on and will be sent to the mission log. Each block has different amounts of internal logging which can make mission logs become large in some cases. Users generally do not enable this feature because of the limits to data storage.