# Process json with multiple keys of same name via filebeat.yml

**URL:** <https://discuss.elastic.co/t/process-json-with-multiple-keys-of-same-name-via-filebeat-yml/325003>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 8, 2023, 10:54am UTC](https://discuss.elastic.co/t/process-json-with-multiple-keys-of-same-name-via-filebeat-yml/325003 "2023-02-08T10:54:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stranger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stranger/32/115989_2.png) [@stranger](https://discuss.elastic.co/u/stranger)\
**Post date:** [February 8, 2023, 10:54am UTC](https://discuss.elastic.co/t/process-json-with-multiple-keys-of-same-name-via-filebeat-yml/325003/1 "2023-02-08T10:54:27Z")

</div>

I am trying to process my json log to extract all the fields.

```auto
- decode_json_fields:
      fields: ["message"]
      target: ""
      process_array: false
      expand_keys: true
      overwrite_keys: false

```

Example of log:

```auto
{
  "sub" : "math",
  "sub" : "bio",
  "marks" : 23,
  "marks" : 45,
  "subID" : "math"
}

```

I am trying to upload these all fields either through dynamic renaming or through appending the value to array if needed

---

<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 8, 2023, 12:54pm UTC](https://discuss.elastic.co/t/process-json-with-multiple-keys-of-same-name-via-filebeat-yml/325003/2 "2023-03-08T12:54:28Z")

</div>

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