Skip to content

Stringify JSON Mutation ​

The Stringify JSON mutation is the inverse of Parse JSON. It turns a JSON object or a list of objects back into one JSON text, so a filtered or sorted list can be written to a feed field or stored in an internal field as a single value.

Options ​

This mutation has no options.

  • A list of objects becomes one JSON array text.
  • A single object becomes one JSON object text.
  • A plain list becomes a JSON array of its entries.
  • Any other value is left unchanged.

Objects are written compactly, with their keys in a stable order, so the same input always produces the same text.

Example ​

The extra field videos holds this text:

json
[{ "name": "hero.mp4", "url": "a" }, { "name": "life.mp4", "url": "b" }]

After Parse JSON the value is a list of two objects. Filter objects with the attribute name, the condition includes and the value hero keeps the first object. Stringify JSON then turns the list back into one text:

json
[{"name":"hero.mp4","url":"a"}]

That text can be mapped to a feed field, or saved in an internal field of type text for other mappings to parse again.