title: How To Remove Quotation Marks (" ") In Geo Coordinates On Logstash Conf File
body: <p>I want to express a line on a map in Kibana and the map should be Geojson structure.
  The data that I have is a set of SQL table then I was about to transfer them to Elastic Search using Logstash like this</p>
  <pre><code>input{ ... }
  
  filter{
      
   if [lat] and [lon] {
          mutate{convert =&gt;  [&quot;lat&quot;, &quot;float&quot;]}
          mutate{convert =&gt;  [&quot;lon&quot;, &quot;float&quot;]}
          mutate{convert =&gt;  [&quot;for_lat&quot;, &quot;float&quot;]}
          mutate{convert =&gt;  [&quot;for_lon&quot;, &quot;float&quot;]}
  
          mutate{
              add_field =&gt; {&quot;[location-geotest][type]&quot; =&gt; &quot;multilinestring&quot;}
              add_field =&gt; {&quot;[location-geotest][coordinates]&quot; =&gt; [[&quot;%{lon}&quot;, &quot;%{lat}&quot;]]}
              add_field =&gt; {&quot;[location-geotest][coordinates]&quot; =&gt; [[&quot;%{for_lon}&quot;, &quot;%{for_lat}&quot;]]}
              }
        }
  }
  
  </code></pre>
  <p>However the logstash conf file failed to index the data on Elasticsearch</p>
  <pre><code>{
      :status=&gt;400, 
      :action=&gt;[&quot;index&quot;, {:_id=&gt;&quot;18022&quot;, :_index=&gt;&quot;geo_shape_test&quot;, :routing=&gt;nil, :_type=&gt;&quot;_doc&quot;}, #&lt;LogStash::Event:0x687994b9&gt;], 
      :response=&gt; {
          &quot;index&quot;=&gt;{
              &quot;_index&quot;=&gt;&quot;geo_shape_test&quot;, 
              &quot;_type&quot;=&gt;&quot;_doc&quot;, 
              &quot;_id&quot;=&gt;&quot;18022&quot;, 
              &quot;status&quot;=&gt;400, 
              &quot;error&quot;=&gt;{
                  &quot;type&quot;=&gt;&quot;mapper_parsing_exception&quot;, 
                  &quot;reason&quot;=&gt;&quot;failed to parse field [location-geotest] of type [geo_shape]&quot;, 
                  &quot;caused_by&quot;=&gt;{&quot;type&quot;=&gt;&quot;x_content_parse_exception&quot;, 
                      &quot;reason&quot;=&gt;&quot;[1:164] [geojson] failed to parse field [coordinates]&quot;, 
                      &quot;caused_by&quot;=&gt;{
                          &quot;type&quot;=&gt;&quot;parse_exception&quot;, 
                          &quot;reason&quot;=&gt;&quot;geo coordinates must be numbers&quot;
                      }
                  }
              }
          }
      }
  }
  </code></pre>
  <p>and this is the one of what logstash tried to index</p>
  <pre><code>{
                   &quot;lat&quot; =&gt; 37.567179953757886,
                &quot;gps_id&quot; =&gt; 10491,
             &quot;timestamp&quot; =&gt; 2020-11-22T06:10:45.000Z,
                 &quot;speed&quot; =&gt; 17.25745240090587,
                   &quot;lon&quot; =&gt; 126.99598717854032,
               &quot;for_lat&quot; =&gt; 37.567179953757886,
            &quot;@timestamp&quot; =&gt; 2020-11-27T03:54:21.131Z,
               &quot;for_lon&quot; =&gt; 126.99598717854032,
              &quot;@version&quot; =&gt; &quot;1&quot;,
      &quot;location-geotest&quot; =&gt; {
          &quot;coordinates&quot; =&gt; [
              [0] &quot;[\&quot;126.99598717854032\&quot;, \&quot;37.567179953757886\&quot;]&quot;,
              [1] &quot;[\&quot;126.99598717854032\&quot;, \&quot;37.567179953757886\&quot;]&quot;
          ],
                 &quot;type&quot; =&gt; &quot;multilinestring&quot;
      }
  }
  </code></pre>
  <p>I think the problem is...</p>
  <pre><code> &quot;coordinates&quot; =&gt; [
              [0] &quot;[\&quot;126.99598717854032\&quot;, \&quot;37.567179953757886\&quot;]&quot;,
              [1] &quot;[\&quot;126.99598717854032\&quot;, \&quot;37.567179953757886\&quot;]&quot;
          ],
  </code></pre>
  <p>if I change the part, it will be...</p>
  <pre><code> &quot;coordinates&quot; =&gt; [
              [0] [126.99598717854032, 37.567179953757886],
              [1] [126.99598717854032, 37.567179953757886]
          ],
  </code></pre>
  <p>But I can't find how to solve.</p>