# Decode Array and Extract

**URL:** https://discuss.elastic.co/t/decode-array-and-extract/247802
**Category:** Beats
**Tags:** filebeat
**Created:** [September 7, 2020, 7:31pm UTC](https://discuss.elastic.co/t/decode-array-and-extract/247802 "2020-09-07T19:31:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Milos](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@Milos](https://discuss.elastic.co/u/Milos)
#### Post date: [September 7, 2020, 7:31pm UTC](https://discuss.elastic.co/t/decode-array-and-extract/247802/1 "2020-09-07T19:31:35Z")

</div>

Hi to All,  
last few weeks I am getting up to speed with Filebeat and ES, experience is up to now great!!  
Currently i believe that i am stuck with a small issue: Namely, if i decode array from json, is it possible to extract the array as per XXXXX

in my Configuration file i have

```
`processors:

```

- decode\_json\_fields:  
fields: ["wlan\_addr"]  
process\_array: true  
overwrite\_keys: false  
add\_error\_key: true
- extract\_array:  
field: "wlan\_addr"  
mappings:  
source.ip: 0  
destination.ip: 1  
network.transport: 2`  
but the array is not extracted at.  
Is it possible to firstly decode JSON and than to extract the array elements? If yes any help would be more than welcome!!

P.s.Logstash is unfortunatelly not an option  
Cheers  
MB

---

<div class="post-metadata">

### Author: ![MarianaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marianad/32/42687_2.png) [@MarianaD](https://discuss.elastic.co/u/MarianaD)
#### Post date: [September 9, 2020, 1:07pm UTC](https://discuss.elastic.co/t/decode-array-and-extract/247802/2 "2020-09-09T13:07:09Z")

</div>

hi @Milos, can you provide us with an example of the message you are trying to run the processes against in order to get a better understanding on the goal?

---

<div class="post-metadata">

### Author: ![Milos](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@Milos](https://discuss.elastic.co/u/Milos)
#### Post date: [September 9, 2020, 1:33pm UTC](https://discuss.elastic.co/t/decode-array-and-extract/247802/3 "2020-09-09T13:33:36Z")

</div>

Hi Mariana,  
silly me i forgot the most important part:

{"timestamp" : "1599380552945", "layers" : {"wlan\_addr": ["f8:1f:38:f1:10:f5","f1:b2:13:54:8a:75","f2:b1:12:51:8c:43"]}}

The Json is rather simple but I am unfortunately not experienced enough in Filebeat to pin point it

Thanks in Advance!  
MB

---

<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: [October 7, 2020, 3:33pm UTC](https://discuss.elastic.co/t/decode-array-and-extract/247802/4 "2020-10-07T15:33:52Z")

</div>

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