json2json - Transform JSON format

Transform a JSON input to another JSON format using a template.

templateJson
Type
object
Template to be filled with data.
Example:
{
  "creationDate": "{{info.created_at}}",
  "creator": {
    "name": "{{info.created_by}}"
  },
  "people": [
    "{{staff.developers}}",
    {
      "firstName": "{{name}}",
      "city": "{{address.city}}",
      "likes": "{{hobbies}}",
      "hobbies": "=> join(hobbies,' & ')",
      "age": "=> toNumber(age)",
      "isAdmin": "=> toBoolean(isAdmin)"
    }
  ]
}
templateJsonString
Type
string
Stringified template to be filled with data. For expressions you can use the following syntaxes: {{ name }} and { { name } }.
Example:
{"creationDate":"{{info.created_at}}","creator":{"name":"{{info.created_by}}"},"people":["{{staff.developers}}",{"firstName":"{{name}}","city":"{{address.city}}","likes":"{{hobbies}}","hobbies":"=> join(hobbies,' & ')","age":"=> toNumber(age)","isAdmin":"=> toBoolean(isAdmin)"}]}
inputJson
Type
object
JSON with data
Example:
{
  "info": {
    "created_at": "01.01.2023",
    "created_by": "1001fx Admin"
  },
  "staff": {
    "developers": [
      {
        "name": "Rob",
        "address": {
          "city": "London"
        },
        "hobbies": [
          "cycling",
          "hifi"
        ],
        "age": "22",
        "isAdmin": "true"
      },
      {
        "name": "Chris",
        "address": {
          "city": "Oxford"
        },
        "hobbies": [
          "hill walking"
        ]
      }
    ]
  }
}
inputJsonString
Type
string
Stringified JSON with data
Example:
{"info":{"created_at":"01.01.2023","created_by":"1001fx Admin"},"staff":{"developers":[{"name":"Rob","address":{"city":"London"},"hobbies":["cycling","hifi"],"age":"22","isAdmin":"true"},{"name":"Chris","address":{"city":"Oxford"},"hobbies":["hill walking"]}]}}

Available on

Postman
Make
Zapier
N8N
Airtable
SeaTable
Bubble
Power Automate
Workato
SAP Build