In a config modifier schema, use concat to create an array by linking defined elements together. Each element under the concat keyword can be composed of any other valid config modifier keywords. Essentially, this creates an array list for a property in the output or a list to be checked during processing.
Exclusive keywords
Useful expressions for concat
This keyword executes in the following order:
- omit
- constant
- references
- use
- get
- Mutually exclusive keywords at this level:
- properties
- if
- concat
- switch
- pipe
- merge
- prefer
- items
- default
- plugin
You can use concat and - to check for items in an array then joining them in one list rather than checking each item individually.
Example: Observations input from initial payload
json
Example: Observations selector
json
Example: Config modifier with concat and include keywords
yaml
Example: Observations output
json
You can use concat and {} to add a new item to an array that already exists in the payload, rather than replacing it entirely.
Example 2: Concat input
json
Example 2: Concat selector
json
Example 2: Config modifier with concat keyword and {}
yaml
Example 2: Concat output
json