Split JSON into multiple variables/ an array
<p>I have this JSON String:</p>

<pre><code>"[{"lat":"42.021631","lng":"-93.624239"},{"lat":"19.112049","lng":"72.870234"}]"
</code></pre>

<p>I need it in this format to be able to plot using Google Maps which uses this:</p>

<pre><code>var flightPlanCoordinates = [
      {lat: 37.772, lng: -122.214},
      {lat: 21.291, lng: -157.821},
      {lat: -18.142, lng: 178.431},
      {lat: -27.467, lng: 153.027}
    ];
</code></pre>

<p>How do I get this in the format? I've received my string after using Papa Parse to import CSV and removed the quotes in the JSON text. Any help will be appreciated.</p>