Copy
Copy (copy)
Copy fields of an event using JSONPATH expressions.
Transform json
Minimal example
actions: - copy: jsonpath-fields: {}JSON
{ "actions": [ { "copy": { "jsonpath-fields": {} } } ]}Contents
Fields
| Field | Type | Required | Description |
|---|---|---|---|
jsonpath-fields Mapping | map (string) | ✅ | Fields to add to the event, where the values are the result of a JSONPath query For the query syntax see: https://www.ietf.org/archive/id/draft-ietf-jsonpath-base-12.html. |
description General | string | describe this step. | |
condition General | lua-expression (string) | Only run this action if the specified condition is met. Examples: 2 * count() | |
overwrite Mapping | boolean (bool) | Override existing fields. |
General
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
description | string | describe this step. | |
condition | lua-expression (string) | Only run this action if the specified condition is met. Examples: 2 * count() |
Mapping
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
jsonpath-fields | map (string) | ✅ | Fields to add to the event, where the values are the result of a JSONPath query For the query syntax see: https://www.ietf.org/archive/id/draft-ietf-jsonpath-base-12.html. |
overwrite | boolean (bool) | Override existing fields. |
Schema
Jsonpath Fields Table
| Output field | Selector |
|---|---|
user_id | $.user.id |
Key format: field. Value format: jsonpath.
JSONPath query that selects a single value. Dot-path (a.b.0) and JSON Pointer (/a/b/0) are accepted as convenience and converted to JSONPath.