# Logstash simplify list of dict

**URL:** https://discuss.elastic.co/t/logstash-simplify-list-of-dict/224151
**Category:** Logstash
**Created:** [March 18, 2020, 4:20pm UTC](https://discuss.elastic.co/t/logstash-simplify-list-of-dict/224151 "2020-03-18T16:20:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![msirovy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/msirovy/32/64680_2.png) [@msirovy](https://discuss.elastic.co/u/msirovy)
#### Post date: [March 18, 2020, 4:20pm UTC](https://discuss.elastic.co/t/logstash-simplify-list-of-dict/224151/1 "2020-03-18T16:20:13Z")

</div>

Hi,

I am trying to parse by logstash this:

```
"attributes": [
          {
            "value": "ValueA",
            "name": "NameA"
          },
          {
            "value": "ValueB",
            "name": "NameB"
          },
          {
            "value": "ValueC",
            "name": "NameC"
          }
        ],

```

To this:

```
"attributes": {
  "NameA": "ValueA",
  "NameB": "ValueB",
  "NameC": "ValueC"
}

```

Any recommendations?

I don't want to split this list to more records... The number of dictionaries and the values of name fields within them vary

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [March 22, 2020, 4:05pm UTC](https://discuss.elastic.co/t/logstash-simplify-list-of-dict/224151/2 "2020-03-22T16:05:13Z")

</div>

You will need a ruby filter. Something similar to [this](https://discuss.elastic.co/t/logstash-adding-custom-field-to-documennt/139361/4).

---

<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 19, 2020, 4:05pm UTC](https://discuss.elastic.co/t/logstash-simplify-list-of-dict/224151/3 "2020-04-19T16:05:13Z")

</div>

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