title: .toArray(); is not a function
body: <p>I have a issue with converting longitute and latitute into a array my code is like this:</p>
  
  <pre><code>&lt;div id="right" class="map"&gt;
  
    &lt;div id='map' class="map" style='width: 100%; height: 100%; margin: 0px;'&gt;&lt;/div&gt;
    &lt;script&gt;
      mapboxgl.accessToken = 'pk.eyJ1IjoibGl2ZS1vbGRoYW0iLCJhIjoiY2ozbXk5ZDJ4MDAwYjMybzFsdnZwNXlmbyJ9.VGDuuC92nvPbJo-qvhryQg';
      var map = new mapboxgl.Map({
        container: 'map',
        style: 'mapbox://styles/mapbox/streets-v10',
        center: [-1.77, 52.73],
        zoom: 3
  
      });
      map.addControl(new MapboxGeocoder({
        accessToken: mapboxgl.accessToken
      }));
      map.on('click', function(e) {
        var test = JSON.stringify(e.lngLat);
        test.toArray();
        console.log(test);
        mapboxgl.Marker()
          .setLngLat(test)
          .addTo(map);
      });
  </code></pre>
  
  <p>test is returning value as:</p>
  
  <p><code>{"lng":-2.8246875000017155,"lat":52.72999999999914}</code></p>
  
  <p>However, the value needs to be as:</p>
  
  <p><code>[-2.8246875000017155, 52.72999999999914]</code></p>
  
  <p>So toArray should work but I get</p>
  
  <blockquote>
    <p>Uncaught TypeError: test.toArray is not a function<br>
         at e. (1:181)<br>
         at e.Evented.fire (evented.js:87)<br>
         at h (bind_handlers.js:139)<br>
         at HTMLDivElement.s (bind_handlers.js:114)  </p>
  </blockquote>
  
  <p><strong>Edit</strong></p>
  
  <pre><code>map.on('click', function(e) {
    var test = e.lngLat;
    console.log(test);
    test.toArray();
    mapboxgl.Marker()
      .setLngLat(test)
      .addTo(map);
  });
  </code></pre>
  
  <p>But now I get:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'bind' of undefined</p>
  </blockquote>