# Parsing an array of coordinate values

**URL:** <https://discuss.elastic.co/t/parsing-an-array-of-coordinate-values/147669>\
**Category:** Logstash\
**Created:** [September 7, 2018, 7:25am UTC](https://discuss.elastic.co/t/parsing-an-array-of-coordinate-values/147669 "2018-09-07T07:25:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![waynesmallman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/waynesmallman/32/18596_2.png) [@waynesmallman](https://discuss.elastic.co/u/waynesmallman)\
**Post date:** [September 7, 2018, 7:25am UTC](https://discuss.elastic.co/t/parsing-an-array-of-coordinate-values/147669/1 "2018-09-07T07:25:53Z")

</div>

Hi, we're attempting to parse coordinate data: `"[33.5586, -112.0955]"` but we don't know if it needs to be converted, and if so, what type should we use?

So far, we've tried `string`, but it's as if Logstash is attempting to parse it regardless:

> [2018-09-07T08:13:48,565][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"correct\_downloads\_en\_v1", :\_type=\>"correct\_downloads", :\_routing=\>nil}, #\<LogStash::Event:0x76b9b85c\>], :response=\>{"index"=\>{"\_index"=\>"correct\_downloads\_en\_v1", "\_type"=\>"correct\_downloads", "\_id"=\>"m0rhsmUBxmfELKVANSDi", "status"=\>400, "error"=\>{"type"=\>"mapper\_parsing\_exception", "reason"=\>"failed to parse", "caused\_by"=\>{"type"=\>"number\_format\_exception", "reason"=\>"For input string: "[144.9522""}}}}}

In the ".conf" file, we have:

```
mutate {
	rename => {
		"keen_ip_geo.coordinates" => "[ip_geo][coordinates]"
	}
	convert => {
		"keen_ip_geo.coordinates" => "string"
	}
}

```

Is it possible there's a problem or conflict between the `convert` and the `rename` instructions?

---

<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 17, 2018, 5:04pm UTC](https://discuss.elastic.co/t/parsing-an-array-of-coordinate-values/147669/2 "2018-09-17T17:04:17Z")

</div>

You probably mean `[keen_ip_geo][coordinates]` and not `keen_ip_geo.coordinates`. But I'm not sure your configuration makes sense; if the rename operation is successful there won't be a field left to convert.

---

<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 15, 2018, 5:04pm UTC](https://discuss.elastic.co/t/parsing-an-array-of-coordinate-values/147669/3 "2018-10-15T17:04:30Z")

</div>

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