JSONLoomJSONLoom
Documentation

Operation Catalog

Object

FilterByKey

Keep or remove object keys by name

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "mode": "keep",
  "keys": [
    "users",
    "meta"
  ]
}

Output

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}
Open runnable example

RenameKey

Rename a key recursively

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "from": "email",
  "to": "primaryEmail"
}

Output

{
  "users": [
    {
      "primaryEmail": "alice@example.com"
    }
  ],
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}
Open runnable example

ExtractPath

Extract a nested value by path

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users"
}

Output

[
  {
    "id": 1,
    "name": " Alice ",
    "email": "alice@example.com",
    "status": "active",
    "score": 82,
    "orders": [
      {
        "id": "o-1",
        "total": 120,
        "createdAt": "2024-01-01T10:00:00Z",
        "shippedAt": "2024-01-03T10:00:00Z"
      },
      {
        "id": "o-2",
        "total": 40,
        "createdAt": "2024-01-05T09:00:00Z",
        "shippedAt": "2024-01-06T09:30:00Z"
      }
    ],
    "tags": [
      "vip",
      "newsletter",
      "vip"
    ]
  },
  {
    "id": 2,
    "name": "Bob",
    "email": "bob@example.com",
    "status": "inactive",
    "score": 67,
    "orders": [
      {
        "id": "o-3",
        "total": 20,
        "createdAt": "2024-02-01T12:00:00Z",
        "shippedAt": "2024-02-01T14:00:00Z"
      }
    ],
    "tags": [
      "trial"
    ]
  }
]
Open runnable example

RenameKeysByPattern

Regex-based key renaming recursively

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "pattern": "^id$",
  "replacement": "userId",
  "flags": ""
}

Output

{
  "users": [
    {
      "userId": 1
    }
  ]
}
Open runnable example

NormalizeKeyCase

Convert all keys to camel/snake/kebab/pascal

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "mode": "camel"
}

Output

{
  "generatedAt": "2024-03-01T08:00:00Z",
  "region": "eu"
}
Open runnable example

PickPaths

Return new object with only specified paths

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "paths": [
    "meta.generatedAt",
    "metrics.revenue"
  ]
}

Output

{
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z"
  },
  "metrics": {
    "revenue": 160.5
  }
}
Open runnable example

OmitPaths

Remove properties at specified paths

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "paths": [
    "users[1].tags"
  ]
}

Output

{
  "users": [
    {
      "tags": [
        "vip"
      ]
    },
    {}
  ]
}
Open runnable example

SetPath

Set or overwrite value at a path

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "meta.source",
  "value": "import-batch"
}

Output

{
  "meta": {
    "source": "import-batch"
  }
}
Open runnable example

DeletePath

Delete property at path

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[1].orders"
}

Output

{
  "users": [
    {
      "id": 1
    },
    {
      "id": 2
    }
  ]
}
Open runnable example

MergeAtPath

Merge target object with source (shallow/deep/overwrite)

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "meta",
  "source": {
    "environment": "prod"
  },
  "mode": "deep"
}

Output

{
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu",
    "environment": "prod"
  }
}
Open runnable example

FlattenObject

Flatten nested object into dotted keys

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "meta"
}

Output

{
  "meta.generatedAt": "2024-03-01T08:00:00Z",
  "meta.region": "eu"
}
Open runnable example

UnflattenObject

Expand dotted keys into nested object

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "meta"
}

Output

{
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}
Open runnable example

Array

MapArray

Map an array at a JSON path (type cast)

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users",
  "operations": [
    {
      "id": "nested-1",
      "type": "TrimStrings",
      "config": {
        "path": "name"
      }
    }
  ]
}

Output

{
  "users": [
    {
      "name": "Alice"
    },
    {
      "name": "Bob"
    }
  ]
}
Supports nested pipelines; keep nested operations focused and short.
Open runnable example

FilterArray

Filter items in an array by a condition

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users",
  "key": "status",
  "operator": "eq",
  "value": "active",
  "mode": "keep"
}

Output

[
  {
    "id": 1,
    "status": "active"
  }
]
Open runnable example

SortArray

Sort an array by value or key

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users",
  "by": "score",
  "order": "desc",
  "nulls": "last",
  "caseInsensitive": false
}

Output

[
  {
    "id": 1,
    "score": 82
  },
  {
    "id": 2,
    "score": 67
  }
]
Open runnable example

UniqueArray

Remove duplicates from an array

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].tags"
}

Output

[
  "vip",
  "newsletter"
]
Open runnable example

FlattenArray

Flatten nested arrays to a given depth

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users",
  "depth": 1
}

Output

[
  1,
  2,
  3
]
Open runnable example

SliceArray

Slice an array by start/end/step

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users",
  "start": 0,
  "end": 1,
  "step": 1
}

Output

[
  {
    "id": 1,
    "name": " Alice "
  }
]
Open runnable example

GroupBy

Group objects in an array by a key

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users",
  "by": "status"
}

Output

{
  "active": [
    {
      "id": 1
    }
  ],
  "inactive": [
    {
      "id": 2
    }
  ]
}
Open runnable example

ReduceArray

Reduce an array (sum/avg/min/max/concat)

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users",
  "by": "score",
  "op": "avg"
}

Output

74.5
Open runnable example

CountArray

Replace an array with its length

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users"
}

Output

2
Open runnable example

JoinArray

Join array items into a string

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].tags",
  "separator": ", "
}

Output

"vip, newsletter"
Open runnable example

String

StringReplace

Replace text within string values

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].name",
  "search": "Alice",
  "replace": "Alicia"
}

Output

{
  "users": [
    {
      "name": "Alicia"
    }
  ]
}
Open runnable example

RegexReplace

Regex-based string replace with flags

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].email",
  "pattern": "@.*$",
  "replace": "@masked.test",
  "flags": ""
}

Output

"alice@masked.test"
Open runnable example

TrimStrings

Trim whitespace (global or at path)

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].name"
}

Output

"Alice"
Open runnable example

CoerceType

Convert value to string/number/boolean/object/array

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "metrics.revenue",
  "to": "string"
}

Output

"160.5"
Open runnable example

TemplateInterpolate

Interpolate ${...} placeholders from root

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "meta.summary",
  "template": "${meta.region}:${metrics.revenue}",
  "onMissing": "literal"
}

Output

"eu:160.5"
Template placeholders support ${...}; missing values depend on onMissing mode.
Open runnable example

Base64

Encode or decode Base64

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].email",
  "mode": "encode"
}

Output

"YWxpY2VAZXhhbXBsZS5jb20="
Open runnable example

StringCase

Convert to lower/upper case

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].status",
  "mode": "uppercase",
  "coerceNonString": false
}

Output

"ACTIVE"
Open runnable example

Math

Add

Add a number to a value or to each array element

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].score",
  "value": 5
}

Output

87
Open runnable example

Subtract

Subtract a number from a value or each array element

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].score",
  "value": 2
}

Output

80
Open runnable example

Multiply

Multiply a value or each array element

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].score",
  "value": 2
}

Output

164
Open runnable example

Divide

Divide a value or each array element

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].score",
  "value": 2
}

Output

41
Open runnable example

Modulo

Modulo of a value or each array element

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].score",
  "value": 10
}

Output

2
Open runnable example

Power

Raise a value or each array element to a power

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].score",
  "value": 2
}

Output

6724
Open runnable example

Round

Round value(s) to a given precision

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "metrics.revenue",
  "precision": 0
}

Output

161
Open runnable example

Clamp

Clamp value(s) between min and max

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].score",
  "min": 0,
  "max": 100
}

Output

82
Open runnable example

Sum

Replace an array with the sum of its numeric values

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].orders",
  "by": "total"
}

Output

160
Open runnable example

Count

Replace an array with its count (length)

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].orders"
}

Output

2
Open runnable example

Min

Replace an array with its minimum numeric value

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].orders",
  "by": "total"
}

Output

40
Open runnable example

Max

Replace an array with its maximum numeric value

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users[0].orders",
  "by": "total"
}

Output

120
Open runnable example

Control

If

Conditionally run one of two pipelines

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "when": {
    "path": "meta.region",
    "op": "eq",
    "value": "eu"
  },
  "then": [
    {
      "id": "then-1",
      "type": "SetPath",
      "config": {
        "path": "meta.eu",
        "value": true
      }
    }
  ],
  "else": [
    {
      "id": "else-1",
      "type": "SetPath",
      "config": {
        "path": "meta.eu",
        "value": false
      }
    }
  ]
}

Output

{
  "meta": {
    "eu": true
  }
}
Supports nested pipelines; keep nested operations focused and short.
Open runnable example

Switch

Multi-branch pipeline based on a value

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "meta.region",
  "cases": [
    {
      "value": "eu",
      "ops": [
        {
          "id": "case-1",
          "type": "SetPath",
          "config": {
            "path": "meta.currency",
            "value": "EUR"
          }
        }
      ]
    }
  ],
  "default": [
    {
      "id": "def-1",
      "type": "SetPath",
      "config": {
        "path": "meta.currency",
        "value": "USD"
      }
    }
  ]
}

Output

{
  "meta": {
    "currency": "EUR"
  }
}
Supports nested pipelines; keep nested operations focused and short.
Open runnable example

Validation

ValidateJSON

Validate data against a JSON Schema (AJV)

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "users",
  "schema": {
    "type": "array"
  },
  "failOnError": true
}

Output

{
  "valid": true
}
ValidateJSON can fail fast; tune failOnError for strict vs permissive pipelines.
Open runnable example

Date

ParseDate

Parse a date string to ISO at a path

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "meta.generatedAt",
  "format": "yyyy-LL-dd'T'HH:mm:ss'Z'",
  "timezone": "utc"
}

Output

{
  "meta": {
    "generatedAt": "2024-03-01T08:00:00.000Z"
  }
}
Date operations rely on parseable ISO strings and explicit units/timezones.
Open runnable example

IsDateCompare

Compare two date values and return boolean

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "meta.generatedAt",
  "compareTo": "2024-01-01T00:00:00Z",
  "op": "after",
  "resultPath": "meta.isFresh"
}

Output

{
  "meta": {
    "isFresh": true
  }
}
Date operations rely on parseable ISO strings and explicit units/timezones.
Open runnable example

DateAdd

Add/subtract time units to a date

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "path": "meta.generatedAt",
  "amount": 7,
  "unit": "days"
}

Output

{
  "meta": {
    "generatedAt": "2024-03-08T08:00:00.000Z"
  }
}
Date operations rely on parseable ISO strings and explicit units/timezones.
Open runnable example

DateDiff

Difference between two dates in a unit

Input

{
  "users": [
    {
      "id": 1,
      "name": " Alice ",
      "email": "alice@example.com",
      "status": "active",
      "score": 82,
      "orders": [
        {
          "id": "o-1",
          "total": 120,
          "createdAt": "2024-01-01T10:00:00Z",
          "shippedAt": "2024-01-03T10:00:00Z"
        },
        {
          "id": "o-2",
          "total": 40,
          "createdAt": "2024-01-05T09:00:00Z",
          "shippedAt": "2024-01-06T09:30:00Z"
        }
      ],
      "tags": [
        "vip",
        "newsletter",
        "vip"
      ]
    },
    {
      "id": 2,
      "name": "Bob",
      "email": "bob@example.com",
      "status": "inactive",
      "score": 67,
      "orders": [
        {
          "id": "o-3",
          "total": 20,
          "createdAt": "2024-02-01T12:00:00Z",
          "shippedAt": "2024-02-01T14:00:00Z"
        }
      ],
      "tags": [
        "trial"
      ]
    }
  ],
  "metrics": {
    "revenue": 160.5,
    "vat": 0.24
  },
  "meta": {
    "generatedAt": "2024-03-01T08:00:00Z",
    "region": "eu"
  }
}

Config

{
  "startPath": "users[0].orders[0].createdAt",
  "endPath": "users[0].orders[0].shippedAt",
  "unit": "days"
}

Output

{
  "users": [
    {
      "orders": [
        {
          "shippedAt_diff_days": 2
        }
      ]
    }
  ]
}
Date operations rely on parseable ISO strings and explicit units/timezones.
Open runnable example

Extra

writeResultTo

When an operation exposes writeResultTo, you can write the computed value to a different JSON path instead of applying it in place. Leave it empty to keep in-place behavior.