# Lon Lat as Location - need help to parse the string

**URL:** <https://discuss.elastic.co/t/lon-lat-as-location-need-help-to-parse-the-string/224979>\
**Category:** Logstash\
**Created:** [March 25, 2020, 11:54am UTC](https://discuss.elastic.co/t/lon-lat-as-location-need-help-to-parse-the-string/224979 "2020-03-25T11:54:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Datakids](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/datakids/32/39622_2.png) [@Datakids](https://discuss.elastic.co/u/Datakids)\
**Post date:** [March 25, 2020, 11:54am UTC](https://discuss.elastic.co/t/lon-lat-as-location-need-help-to-parse-the-string/224979/1 "2020-03-25T11:54:54Z")

</div>

Hi there,  
i got a location field (lon, lat) like this:  
"(6.95779078709084,51.1122094336657)"

I dont know how to write the mutate filter in logstash for this string

Beforehand I had lon lat as single fields and using this:

```
mutate {
		add_field => ["[location]","%{lon}" ]
		add_field => ["[location]","%{lat}" ]
		}
		mutate {convert => {"[location]" => "float"}
		}

```

Thanks and Regards

---

<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:** [April 22, 2020, 11:55am UTC](https://discuss.elastic.co/t/lon-lat-as-location-need-help-to-parse-the-string/224979/2 "2020-04-22T11:55:00Z")

</div>

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