{
  "name": "json-transform",
  "title": "Transform JSON with a jq filter",
  "category": "Data",
  "tags": [
    "data",
    "jq"
  ],
  "version": "1.0.0",
  "date": "2026-07-16",
  "notes": "Initial release.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/json-transform/1.0.0.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/json-transform/1.0.0/template.yaml",
  "entrypoint": "transform",
  "parameters": [
    {
      "name": "input-json",
      "title": "Input JSON",
      "description": "The JSON document to transform, as a string.",
      "type": "string",
      "required": true,
      "example": "{\"items\":[{\"id\":1},{\"id\":2}]}"
    },
    {
      "name": "jq-filter",
      "title": "jq filter",
      "description": "A jq program applied to the parsed input; its output is printed to stdout.",
      "type": "string",
      "required": false,
      "default": ".",
      "example": ".items | map(.id)"
    }
  ],
  "images": [
    {
      "ref": "ghcr.io/jqlang/jq@sha256:b9c68867e5766576263a222e91db3de422d802069c7af70440e667a95344e486",
      "repository": "ghcr.io/jqlang/jq",
      "tag": "1.8.2",
      "digest": "sha256:b9c68867e5766576263a222e91db3de422d802069c7af70440e667a95344e486"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/json-transform/1.0.0/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/json-transform/1.0.0/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: json-transform\n  labels:\n    dagweave.io/catalog-item: json-transform\n  annotations:\n    # The catalog semver this manifest was authored at. The dagweave app records\n    # (catalog-item-id, semver) -\u003e content-hash -\u003e base-vN when it mints the tenant\n    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.\n    dagweave.io/catalog-version: \"1.0.0\"\n    dagweave.io/catalog-category: \"Data\"\nspec:\n  entrypoint: transform\n  templates:\n    - name: transform\n      inputs:\n        parameters:\n          # The JSON document to transform, as a string.\n          - name: input-json\n          # A jq program applied to the parsed input; its output is printed to stdout.\n          - name: jq-filter\n            default: \".\"\n      container:\n        # Pinned by digest per the catalog convention: an image rebuild can never\n        # silently change the behaviour of an already-released item version.\n        # ghcr.io/jqlang/jq:1.8.2\n        image: ghcr.io/jqlang/jq@sha256:b9c68867e5766576263a222e91db3de422d802069c7af70440e667a95344e486\n        # This is a minimal (shell-less) image whose only binary is /jq, so jq runs\n        # directly. The untrusted document is read from the INPUT_JSON env var via\n        # jq's `env` builtin (never interpolated into a shell); the jq-filter is the\n        # program itself, so it is placed in the argv program string. -n means \"no\n        # input file\", -c compact output.\n        command: [/jq]\n        args:\n          - -n\n          - -c\n          - \"(env.INPUT_JSON | fromjson) | ({{inputs.parameters.jq-filter}})\"\n        env:\n          - name: INPUT_JSON\n            value: \"{{inputs.parameters.input-json}}\"\n",
  "templateSha256": "d08e2e764072a6d0374a1d070897d12eeff06244fee1db0cbbf4a142223f0b05",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/json-transform",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
