# LOCATION as template with an array of two values

**URL:** <https://discuss.elastic.co/t/location-as-template-with-an-array-of-two-values/149806>\
**Category:** Logstash\
**Created:** [September 25, 2018, 10:45am UTC](https://discuss.elastic.co/t/location-as-template-with-an-array-of-two-values/149806 "2018-09-25T10:45:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olha1](https://avatars.discourse-cdn.com/v4/letter/o/9f8e36/32.png) [@Olha1](https://discuss.elastic.co/u/Olha1)\
**Post date:** [September 25, 2018, 10:45am UTC](https://discuss.elastic.co/t/location-as-template-with-an-array-of-two-values/149806/1 "2018-09-25T10:45:58Z")

</div>

Hi! I have config file with this in filter:  
mutate {  
add\_field =\> {  
"[location]" =\> "%{latitude},%{longitude}"  
}  
remove\_field =\> ["latitude", "longitude"]  
}  
But, in 5 version in logstash, location was array, and I can visualize it like geo point. In 6 version in logstash it is like row type, and I can't visualize it.

Give me advice about: How I may to do "[location]" field template with an array of two values

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 28, 2018, 6:04am UTC](https://discuss.elastic.co/t/location-as-template-with-an-array-of-two-values/149806/2 "2018-09-28T06:04:42Z")

</div>

You can do

```nohighlight
mutate {
  add_field => {
    "location" => "%{latitude}"
  }
}
mutate {
  add_field => {
    "location" => "%{longitude}"
  }
}

```

to make `location` an array of these items.

---

<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 26, 2018, 6:04am UTC](https://discuss.elastic.co/t/location-as-template-with-an-array-of-two-values/149806/3 "2018-10-26T06:04:46Z")

</div>

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