Pluxbox Logo

Get data block

Purpose

Get data out of an object. This block is the opposite of the 'set data' block.

Input

  • Object
    The object containing the desired data. This will trigger an output immediately.

  • Path (mandatory)
    Path to the key of the desired data. Can be a combination of keys if the desired data is nested further inside an object. E.g. node.id will return the value of the id. This will not trigger any output.

Output

  • Value
    The data is located at the path. Can return anything including, but not limited to text, numbers, lists, or other objects.

Example

I wish to extract the age of my person object:

	{
	  "node": {
	    "name":"Oswald Cobblepot"
	    "age":"34"
	    "alias:"The Pengiun"
	    "ability": "Very lucky"
	  }
	}

graph LR
A(Person object) --Object--> B(Get Data)
C(['node.name']) --Path--> B
B --> D(['Oswald Cobblepot'])

Caveats

  • Cannot be used on lists. Use the 'loop array' block to get access to the individual items.
  • Make sure the path is set before providing the object.