# Append ingest processor stringifies arrays instead of processing the elements one by one

**URL:** <https://discuss.elastic.co/t/append-ingest-processor-stringifies-arrays-instead-of-processing-the-elements-one-by-one/333486>\
**Category:** Elasticsearch\
**Tags:** ingest-pipeline\
**Created:** [May 15, 2023, 4:13pm UTC](https://discuss.elastic.co/t/append-ingest-processor-stringifies-arrays-instead-of-processing-the-elements-one-by-one/333486 "2023-05-15T16:13:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Technici4n](https://avatars.discourse-cdn.com/v4/letter/t/e8c25b/32.png) [@Technici4n](https://discuss.elastic.co/u/Technici4n)\
**Post date:** [May 15, 2023, 4:13pm UTC](https://discuss.elastic.co/t/append-ingest-processor-stringifies-arrays-instead-of-processing-the-elements-one-by-one/333486/1 "2023-05-15T16:13:30Z")

</div>

Hello, it seems that the append processor "stringifies" input arrays instead of processing the elements one by one. Could that be? (Using elasticsearch 8.6.2)

Pipeline:

```auto
    "description": "testing issues with append",
    "processors": [
      {
        "append": {
          "field": "copy_to",
          "value": [
            "{{{from}}}"
          ],
          "ignore_failure": true
        }
      }
    ]

```

Test document:

```auto
[
  {
    "_index": "o",
    "_id": "i",
    "_source": {
      "from": [
        2,
        3
      ]
    }
  }
]

```

Simulated output:

```auto
{
  "docs": [
    {
      "doc": {
        "_index": "o",
        "_id": "i",
        "_version": "-3",
        "_source": {
          "copy_to": [
            "{0=2, 1=3}"
          ],
          "from": [
            2,
            3
          ]
        },
        "_ingest": {
          "timestamp": "2023-05-15T16:11:17.691991822Z"
        }
      }
    }
  ]
}

```

I'd expect `copy_to` to be `[2, 3]`, not `{0=2, 1=3}`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 12, 2023, 4:13pm UTC](https://discuss.elastic.co/t/append-ingest-processor-stringifies-arrays-instead-of-processing-the-elements-one-by-one/333486/2 "2023-06-12T16:13:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
