anchor.diff:  --------------------------------------------------
   // NOTCONSOLE
   
  -Then the document will look like this after preprocessing:
  +Then the document will look like this after processing:
   
   [source,js]
   --------------------------------------------------
  
positive.code: --------------------------------------------------
  // NOTCONSOLE
  
  After preprocessing the result is:
  
  [source,js]
  --------------------------------------------------
  
negative.code: <titleabbrev>Foreach</titleabbrev>
  ++++
  
  Runs an ingest processor on each element of an array or object.
  
  All ingest processors can run on array or object elements. However, if the
  number of elements is unknown, it can be cumbersome to process each one in the
  same way.
  
  The `foreach` processor lets you specify a `field` containing array or object
  values and a `processor` to run on each element in the field.
  
  [[foreach-options]]
  .Foreach Options
  [options="header"]
  |======
  | Name             | Required  | Default  | Description
  | `field`          | yes       | -        | Field containing array or object
  values.
  | `processor`      | yes       | -        | Ingest processor to run on each
  element.
  | `ignore_missing` | no        | false    | If `true`, the processor silently
  exits without changing the document if the `field` is `null` or missing.
  include::common-options.asciidoc[]
  |======
  
  [discrete]
  [[foreach-keys-values]]
  ==== Access keys and values
  
  When iterating through an array or object, the `foreach` processor stores the
  current element's value in the `_ingest._value` <<access-ingest-metadata,ingest
  metadata>> field. `_ingest._value` contains the entire element value, including
  any child fields. You can access child field values using dot notation on the
  `_ingest._value` field.
  
  When iterating through an object, the `foreach` processor also stores the
  current element's key as a string in `_ingest._key`.
  
  You can access and change `_ingest._key` and `_ingest._value` in the
  `processor`. For an example, see the <<foreach-object-ex, object
  example>>.
  
  [discrete]
  [[foreach-failure-handling]]
  ==== Failure handling
  
  If the `foreach` processor fails to process an element and no `on_failure`
  processor is specified, the `foreach` processor silently exits. This leaves the
  entire array or object value unchanged.
  
  [discrete]
  [[foreach-examples]]
  ==== Examples
  
  The following examples show how you can use the `foreach` processor with
  different data types and options:
  
  * <<foreach-array-ex>>
  * <<foreach-array-objects-ex>>
  * <<foreach-object-ex>>
  * <<failure-handling-ex>>
  
  [discrete]
  [[foreach-array-ex]]
  ===== Array
  
  Assume the following document:
  
  