Logstash simplify list of dict

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

You will need a ruby filter. Something similar to this.

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