# Dynamic Nested Key Value List Aggregation

**URL:** <https://discuss.elastic.co/t/dynamic-nested-key-value-list-aggregation/263841>\
**Category:** Kibana\
**Created:** [February 10, 2021, 7:58am UTC](https://discuss.elastic.co/t/dynamic-nested-key-value-list-aggregation/263841 "2021-02-10T07:58:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alparslan](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@alparslan](https://discuss.elastic.co/u/alparslan)\
**Post date:** [February 10, 2021, 7:58am UTC](https://discuss.elastic.co/t/dynamic-nested-key-value-list-aggregation/263841/1 "2021-02-10T07:58:49Z")

</div>

Hi,

I have "_inputParams_" object with dynamic key value pair with the following structure.

My purpose is visualizing the "_inputParams_" field according to key.  
Keys are not known. It can be change according to process.

What is the best approach to visualize these data.

1. 

```
{
"action": "FINISHED",
"startedDate": "2021-02-08T12:36:04.008+01:00",
"endedDate": "2021-02-08T12:36:21.873+01:00",
"durationAsMinutes" : 12,
"inputParams" : [
  {
    "key" : "addresstype",
    "value" : "home"
  },
  {
    "key" : "city",
    "value" : "berlin"
  },
  {
    "key" : "primary",
    "value" : "true"
  }
] }

```

1. 

```
{
"action": "FINISHED",
"startedDate": "2021-02-08T12:36:04.008+01:00",
"endedDate": "2021-02-08T12:36:21.873+01:00",
"durationAsMinutes" : 16,
"inputParams" : [
  {
    "key" : "addresstype",
    "value" : "home"
  },
  {
    "key" : "city",
    "value" : "hamburg"
  },
  {
    "key" : "primary",
    "value" : "false"
  }
] }

```

1. 

```
{
"action": "FINISHED",
"startedDate": "2021-02-08T13:36:04.008+01:00",
"endedDate": "2021-02-08T13:36:21.873+01:00",
"durationAsMinutes" : 5,
"inputParams" : [
  {
    "key" : "creditscore",
    "value" : "1300"
  }
] }

```

1. 

```
{
"action": "FINISHED",
"startedDate": "2021-02-08T13:36:04.008+01:00",
"endedDate": "2021-02-08T13:36:21.873+01:00",
"durationAsMinutes": 5,
"inputParams": [
    {
        "key": "creditscore",
        "value": "1200"
    }
]

```

}

1. 

```
{
"action": "FINISHED",
"startedDate": "2021-02-08T13:36:04.008+01:00",
"endedDate": "2021-02-08T13:36:21.873+01:00",
"durationAsMinutes" : 5,
"inputParams" : [
  {
    "key" : "filename",
    "value" : "sample.xls"
  },
  {
    "key" : "filepath",
    "value" : "/home/comp/dev"
  }

] }
```

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [February 10, 2021, 8:15am UTC](https://discuss.elastic.co/t/dynamic-nested-key-value-list-aggregation/263841/2 "2021-02-10T08:15:00Z")

</div>

Hi

I'm not sure what you want to visualize, what kind of answer should the visualization you intend to create give? do you want to visualize e.g. the distribution of input values with type city? Could you share the mapping of your data?

Thx and best,  
Matthias

---

<div class="post-metadata">

**Author:** ![alparslan](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@alparslan](https://discuss.elastic.co/u/alparslan)\
**Post date:** [February 10, 2021, 10:52am UTC](https://discuss.elastic.co/t/dynamic-nested-key-value-list-aggregation/263841/3 "2021-02-10T10:52:47Z")

</div>

Hmm for example following table (data table in kibana) fits to me.

I want to show total count of value by key.

 ![discuss](https://us1.discourse-cdn.com/elastic/original/3X/c/6/c64955c515f2e736253f9f3478388916d27f7160.png)

Thanks..

---

<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:** [March 10, 2021, 10:53am UTC](https://discuss.elastic.co/t/dynamic-nested-key-value-list-aggregation/263841/4 "2021-03-10T10:53:23Z")

</div>

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