Pluxbox Logo

Get data block

Purpose

Get data out of an object.

Input

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

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

Output

  • Value
    The data located at path. Can return anything including, but not limited to: text, numbers, list or another object.

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 indicidual items.
  • Make sure the path is set before providing the object.