append.asciidoc 1.0 KB

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