Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Jolt transform specification input

[
  { // combine each key-value pair under within common arrays
    "operation": "shift",
    "spec": {
      "tags": {
        "*": {
          "$": "&2_&1",
          "@": "&2_&1"
        }
      }
    }
  },
  { // concatenate key-value pairs by colon characters 
    "operation": "modify-overwrite-beta",
    "spec": {
      "*": "=join(':',@(1,&))"
    }
  },
  {
    "operation": "shift",
    "spec": { // make array key common("tags") for all arrays 
              // through use of _ seperator and * wildcard 
      "*_*": "&(0,1)"
    }
  }
]
 
PREVIOUS NEXT
Tagged: #Jolt #transform #specification #input
ADD COMMENT
Topic
Name
2+2 =