Skip to content

Map Toolkit

Develop mode

View as Markdown

Perform one map operation (get keys, get values, merge, filter, size or contains key) on a JSON object without chaining Evaluate Expression steps.

Step library location: Logic

  • Get Keys: Stores the keys as a JSON array, in their original order.
  • Get Values: Stores the values as a JSON array, in the same order.
  • Merge: Combines Input Map with Second Map. When both have the same key, the value from Second Map wins.
  • Filter: Keeps the entries for which Expression is true, for example value > 10 or value.status == "active".
  • Size: Stores the number of entries.
  • Contains Key: Stores true if Input Map has the key in Key and false otherwise.
  • Combining two JSON objects, such as defaults and overrides, with Merge.
  • Keeping only the entries of an object that meet a condition.
  • Checking whether a response includes a key before you read it.
Field Type Need Default Notes
Operation Dropdown Selector Required Get Keys String (enum). Options: Get Keys, Get Values, Merge, Filter, Size, Contains Key
Input Map Auto-complete param expression field Optional None JSON object. Shown for every operation. Must be a JSON object. Blank is treated as an empty map. Key order is kept.
Second Map Auto-complete param expression field Optional None JSON object. Shown for Merge. Must be a JSON object. Its value wins when both maps have the same key.
Expression Auto-complete param expression field Optional None String (JavaScript expression). Shown for Filter. Use key for the entry’s key and value for its value, so value.field works for object values. Reference Process parameters with @.
Key Auto-complete param expression field Optional None String. Shown for Contains Key. The match is exact and case-sensitive.
Max Entries Static input field Optional 1000 Integer. Shown for Filter, which fails if the map has more entries than this. Must be 1 or more.
Field Type Need Default Notes
Output Parameter: Result Static/Dynamic Parameter Field Required MapResult String. Get Keys and Get Values store a JSON array, Merge and Filter a JSON object, Size a number and Contains Key true or false.

Choose an Operation and set Input Map to a JSON object such as {"apples":12,"pears":3}. The step then shows only the other fields that operation needs.

Example: given a map of product codes to stock counts, Filter it with value < 5 to find the products that are running low, then use Get Keys on the result to pass those codes to a Create Service Ticket step.

Generated from step metadata (src/data/process-steps.json). Edit the metadata, not this page.