Skip to main content

Append items to a JSON array

Append items to a JSON array. This Wrk Action can be provided with a JSON array or with a JSON object that contains an array.

Application

  • Text

Inputs (what you have)

NameDescriptionData TypeRequired?Example
Original JSONThe JSON you would like to add items to. Provide either an array or a JSON object that contains an arrayText (Long)Yes{"items":["value1","value2"]}
New itemsThe single value or array of items to add to the JSON array. Example: value3 or [“value3”, “value4”]Text (Long)Yesvalue3 or [“value3”, “value4”]
JSON path location of arrayThe JSON path to the array where you would like to have the new items added. If Original JSON is an array leave this input as $Text (Short)Yes$.items
Remove quotes?Select true if you would like to add the new items without quotation marks. This is ideal for adding numbers, booleans, arrays, objects, or strings that already contain quotesTrue/FalseNotrue

Outputs (what you get)

NameDescriptionData TypeRequired?Example
Appended JSON ArrayThe updated JSON with the new items added to the arrayText (Long)No{"items":["value1","value2","value3","value4"]}

Outcomes

NameDescription
SuccessThis status is selected if the job has successfully completed.

Requirements

  • N/A