javascript convert string to object array
<pre><code>var string = "{lat: -31.563910, lng: 147.154312};{lat: -33.718234, lng: 150.363181};{lat: -33.727111, lng: 150.371124}"
var array = string.split(';');
</code></pre>

<p>Results in:</p>

<pre><code>var array = [
    "{lat: -31.563910, lng: 147.154312}",
    "{lat: -33.718234, lng: 150.363181}",
    "{lat: -33.727111, lng: 150.371124}"
  ]
</code></pre>

<p>Tried using <code>JSON.parse(array);</code> but receive a SyntaxError</p>

<p>The array I am trying to achieve would look like this:</p>

<pre><code>var array = [
    {lat: -31.563910, lng: 147.154312},
    {lat: -33.718234, lng: 150.363181},
    {lat: -33.727111, lng: 150.371124}
  ]
</code></pre>