Pluxbox Logo

Set data block

Purpose

Incapsulate data inside a key to create an object. Combine multiple blocks to create a complex object, either by using the 'Concatenate object' block, or connect multiple blocks directly to the input of the next block, if supported. This block is the opposite of the 'get data' block.

Input

  • Value
    Can be any type, even objects. The data to be encapsulated inside the 'Path'. This will trigger an output immediately.

  • Path (mandatory)
    The key that will define the path to the provided data. This will not trigger any output. Can be a combination of keys, if the data needs to be nested further. E.g. node.id will create the following object:

    {
      "node":{
        "id":VALUE
      }
    }

Output

  • Object
    An object encapsulating the data provided to the value field.

Example

I wish to create a person object:

    {
      "node": {
        "name":"Oswald Cobblepot"
        "alias:"The Penguin"
      }
    }

By combining the set data blocks, the object can be created.

graph LR
A(['Oswald Cobblepot']) --Value--> I(Set Data)
B(['node.name']) --Path--> I
I --Object--> D(Concatenate Object)
C(['The Penguin]) --Value--> K(Set Data)
D(['node.alias']) --Path--> K
K --Object--> D

Caveats

  • If you are creating a complex object, make sure your destination is combining the data, rather than overwriting like the 'buffer' block.