append.asciidoc 989 B

123456789101112131415161718192021222324252627
  1. [[append-processor]]
  2. === Append Processor
  3. Appends one or more values to an existing array if the field already exists and it is an array.
  4. Converts a scalar to an array and appends one or more values to it if the field exists and it is a scalar.
  5. Creates an array containing the provided values if the field doesn't exist.
  6. Accepts a single value or an array of values.
  7. [[append-options]]
  8. .Append Options
  9. [options="header"]
  10. |======
  11. | Name | Required | Default | Description
  12. | `field` | yes | - | The field to be appended to. Supports <<accessing-template-fields,template snippets>>.
  13. | `value` | yes | - | The value to be appended. Supports <<accessing-template-fields,template snippets>>.
  14. include::common-options.asciidoc[]
  15. |======
  16. [source,js]
  17. --------------------------------------------------
  18. {
  19. "append": {
  20. "field": "tags",
  21. "value": ["production", "{{app}}", "{{owner}}"]
  22. }
  23. }
  24. --------------------------------------------------
  25. // NOTCONSOLE