JSON TransformObject
omit
Remove the specified keys from an object
omit
Returns a new object with every top-level key listed in keys removed.
Options
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
keys | array<string> | Yes | — | Top-level keys to remove. |
Example
Input
{ "id": 1, "name": "Ada", "secret": "shh" }Operation
{ "type": "omit", "options": { "keys": ["secret"] } }Output
{ "id": 1, "name": "Ada" }In a Circuit Step
{
"name": "strip_secrets",
"description": "Drop sensitive fields before persisting the user record",
"function": "circuit.core.transform.json",
"input": {
"source": "${{ user }}",
"operations": [
{ "type": "omit", "options": { "keys": ["secret", "password_hash"] } }
]
},
"outputs": [
{
"name": "safe_user",
"description": "User object with sensitive fields removed",
"value": "${{ strip_secrets.output.transformed_result }}"
}
]
}Notes & gotchas
- Errors with
omit: expected objectif the input is not an object. - Keys that aren't present are silently ignored.
- For nested removals, use
unset(which supports dot-paths). - Output preserves the input key order minus the omitted entries.