# How to use Split node using Object key value pair

In this tutorial we will use the split node to split an JSON object based on each key in the root level of the object.

  1. TBD Following is the payload we will using for this use case.

        {
            "empid" : 123,
            "org" : "kumologica",
            "address" : {
                "street" : "Everton st",
                "unit" : 3,
                "state" : "NSW"
            }
        }
    
  2. Drop the split node from the routing section of the pallette to the canvas. Double click the node to open the editor and ensure all the values are set as default. Click save .

    TIP

    If the input object is not an json array then the split node will automatically choose object option.

  3. Wire the TBD to the split node.

  4. Drop the debug node and name it as Completed.

  5. Click on TBD to test the flow.

Observation

The split node will split the object based on the keys at the root level of json object. In the debug panel you can observe the debug node (Completed) printed 3 times. This is because there 3 keys for the input json are detected and the split after splitting will set the payload with the value of the key that was detected.

The payload post the split node will as follows.

1st split  -  123
2nd split  -  "kumologica"
3rd split  -  {
               "street" : "Everton st",
               "unit" : 3,
               "state" : "NSW"
           }