# Variable-value is displaying as an array for nested field in kibana

**URL:** <https://discuss.elastic.co/t/variable-value-is-displaying-as-an-array-for-nested-field-in-kibana/298256>\
**Category:** Kibana\
**Created:** [February 25, 2022, 8:48am UTC](https://discuss.elastic.co/t/variable-value-is-displaying-as-an-array-for-nested-field-in-kibana/298256 "2022-02-25T08:48:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onkel\_Bob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onkel_bob/32/38052_2.png) [@Onkel\_Bob](https://discuss.elastic.co/u/Onkel_Bob)\
**Post date:** [February 25, 2022, 8:48am UTC](https://discuss.elastic.co/t/variable-value-is-displaying-as-an-array-for-nested-field-in-kibana/298256/1 "2022-02-25T08:48:13Z")

</div>

kibana 7.17.0  
Ubuntu 20.04

The json looks like

```auto
    "attempt": [
      {
        "responsecode": 250,
        "responsendr": "2.0.0",
        "transportid": "relay",
        "duration": 0.50850701,
        "jobid": "",
        "response": "Ok: queued as E99733F212",
        "tls": {
          "cipher": "TLS_AES_256_GCM_SHA384",
          "protocol": "TLSv1.3",
          "keysize": 256
        },
        "state": "EOD",
        "dsn": null,
        "retry": 0,
      }
    ],

```

While table view looks like

```auto
attempt
{
  "responsecode": [
    250
  ],
  "responsendr": [
    "2.0.0"
  ],
  "transportid": [
    "relay"
  ],
  "tls.protocol": [
    "TLSv1.3"
  ],
  "tls.cipher": [
    "TLS_AES_256_GCM_SHA384"
  ],
  "finishedtime": [
    "2022-02-24T09:25:25.088Z"
  ],
  "tls.keysize": [
    256
  ],
  "duration": [
    0.508507
  ],
  "jobid": [
    ""
  ],
  "response.keyword": [
    "Ok: queued as E99733F212"
  ],
  "response": [
    "Ok: queued as E99733F212"
  ],
  "state": [
    "EOD"
  ],
  "retry": [
    0
  ]
}

```

Wonder why a variable-value pair is turning over to an array?

Index map is like

```auto
....
        "attempt": {
          "type": "nested",
          "properties": {
            "duration": {
              "type": "float"
            },
            "finishedtime": {
              "type": "date",
              "format": "epoch_millis"
            },
            "jobid": {
              "type": "keyword",
              "ignore_above": 256
            },
....
            "tls": {
              "properties": {
                "cipher": {
                  "type": "keyword",
                  "ignore_above": 256
                },
                "keysize": {
                  "type": "short"
                },
                "protocol": {
                  "type": "keyword",
                  "ignore_above": 256
                }
              }
...

```

Is it by design?

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [March 9, 2022, 5:42pm UTC](https://discuss.elastic.co/t/variable-value-is-displaying-as-an-array-for-nested-field-in-kibana/298256/2 "2022-03-09T17:42:00Z")

</div>

This does not look like a Kibana question but more related to ingest. How are you ingesting that data?

---

<div class="post-metadata">

**Author:** ![Onkel\_Bob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onkel_bob/32/38052_2.png) [@Onkel\_Bob](https://discuss.elastic.co/u/Onkel_Bob)\
**Post date:** [March 10, 2022, 8:16am UTC](https://discuss.elastic.co/t/variable-value-is-displaying-as-an-array-for-nested-field-in-kibana/298256/3 "2022-03-10T08:16:56Z")

</div>

Hmm... Why it is a question to ingest? When getting data via API query from elastic, it look as expected. When I said "The json looks like" I mean data I am getting from command like

`curl -s -k https://localhost:9200/MyIndex-2022-02-27/_search?pretty`

The response looks like

```auto
....
          "attempt": [
            {
              "responsecode": 250,
              "responsendr": "2.0.0",
              "transportid": "relay",
              "duration": 0.558131822,
              "jobid": "",
              "response": "OK l9-20020a2e99c9000000b002464380b3bbsi6986081ljj.302 - gsmtp",
              "tls": {
                "cipher": "TLS_AES_256_GCM_SHA384",
                "protocol": "TLSv1.3",
                "keysize": 256
              },
              "state": "EOD",
              "dsn": null,
              "retry": 0,
            }
          ],
...

```

not any

```auto
attempt
{
  "responsecode": [
    250
  ],

```

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [March 10, 2022, 12:01pm UTC](https://discuss.elastic.co/t/variable-value-is-displaying-as-an-array-for-nested-field-in-kibana/298256/4 "2022-03-10T12:01:08Z")

</div>

> [@Onkel\_Bob](#):
>
> When getting data via API query from elastic, i

Thanks for clarifying so you are ingesting and indexing your data correctly.

> [@Onkel\_Bob](#):
>
> Index map is like

Where exactly are you getting that response with field values as arrays? Is that the JSON view in Discover or where?

---

<div class="post-metadata">

**Author:** ![Onkel\_Bob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onkel_bob/32/38052_2.png) [@Onkel\_Bob](https://discuss.elastic.co/u/Onkel_Bob)\
**Post date:** [March 10, 2022, 12:28pm UTC](https://discuss.elastic.co/t/variable-value-is-displaying-as-an-array-for-nested-field-in-kibana/298256/5 "2022-03-10T12:28:04Z")

</div>

No, it comes from kibana \> Discovery \> index \> Table view. JSON view looks OK now. Not sure if it was like this when I posted the original issue (on 7.17.0) as I updated ELK to 7.17.1 yesterday.

---

<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:** [April 7, 2022, 12:28pm UTC](https://discuss.elastic.co/t/variable-value-is-displaying-as-an-array-for-nested-field-in-kibana/298256/6 "2022-04-07T12:28:10Z")

</div>

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