title: Using jQuery/JS, how do I convert this string into 2 arrays?
body: <p>How do I convert this string:</p>
  
  <pre><code>{ array1: [ 'mary', 'steve', 'george' ],
    array2: [ 'dog', 'cat', 'hobbit' ] }
  </code></pre>
  
  <p>Into 2 arrays?   </p>
  
  <p>I tried the following but I got a syntax error.  </p>
  
  <pre><code>var array = JSON.parse("[" +string + "]");
  </code></pre>
  
  <p>Thank you.  </p>
  
  <p>EDIT </p>
  
  <p>I tried :</p>
  
  <pre><code>var results = $('#progress').text();
  var obj = JSON.parse(results);
  var array1 = obj.array1;
  var array2 = obj.array2;
  console.log(array1);
  </code></pre>
  
  <p>But I'm getting <code>unexpected token a</code></p>
  
  <p>EDIT 2 </p>
  
  <p>I'm using this to retrieve the info from mongodb: </p>
  
  <pre><code>BlogPost.find(query, {"array1":"true", "array2":"true", "_id":0}, function(err, results){
  
    query.exec(function (err, post) {
      if (err) return next(err);
      if (!post) return next(); // 404
  
      res.render('post/view.jade', { post: post, comments: promise, results: results });
    })
  })
  </code></pre>