# Array values into single field

**URL:** <https://discuss.elastic.co/t/array-values-into-single-field/262348>\
**Category:** Logstash\
**Created:** [January 27, 2021, 10:12am UTC](https://discuss.elastic.co/t/array-values-into-single-field/262348 "2021-01-27T10:12:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stevek](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Stevek](https://discuss.elastic.co/u/Stevek)\
**Post date:** [January 27, 2021, 10:12am UTC](https://discuss.elastic.co/t/array-values-into-single-field/262348/1 "2021-01-27T10:12:50Z")

</div>

Hello,

I struggle to extract IPs from JSON, I need to extract all IPs from array/s(regardless of count) into one field.  
Below the part of JSON I want to extract data from:

> ```
> "source": {
> "explicit": {
> "included": [
> {
> "entry": {
> "ip": "10.21.64.0/23"
> }
> },
> {
> "entry": {
> "ip": "10.21.66.0/23"
> }
> },
> {
> "entry": {
> "ip": "10.21.68.0/23"
> }
> },
> {
> "entry": {
> "ip": "10.21.70.0/23"
> }
> },
> {
> "entry": {
> "ip": "10.21.72.0/23"
> }
> },
> {
> "entry": {
> "ip": "10.21.74.0/23"
> }
> },
> {
> "entry": {
> "ip": "10.21.76.0/23"
> }
> }
> ],
> 
> ```

I tried  
"Sources" =\> "%{[source][explicit][included]}"  
"Sources1" =\> "%{[source][explicit][included][entry][ip]}"

And similar alternatives, with no success, field always show exact content array - including brackets, and "entry", "ips", colon...

I only need IP addresses divided by comma.

Thank you in advance  
Stefan

---

<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:** [January 27, 2021, 4:50pm UTC](https://discuss.elastic.co/t/array-values-into-single-field/262348/2 "2021-01-27T16:50:36Z")

</div>

See [here](https://discuss.elastic.co/t/parsing-ip-address-coming-at-random-places-inside-logs/259177/5).

---

<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:** [February 24, 2021, 4:50pm UTC](https://discuss.elastic.co/t/array-values-into-single-field/262348/3 "2021-02-24T16:50:36Z")

</div>

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