title: How do I pass the value instead of the reference of an array?
body: <p>I have this structure:</p>
  
  <pre><code>var a = [];
  a.push({"level": 1, "column": 4, "parent": "none", "title": "Node 0", "content": "Parintele suprem", "show": "1"});
  var b = a;
  
  a.push({"level": 1, "column": 5, "parent": "none", "title": "Node 1", "content": "Parintele suprem", "show": "1"});
  
  console.log(b);
  </code></pre>
  
  <p>Now the problem is that <code>b</code> has the exact content as <code>a</code> (the content after the second push). This suggest (correct me if I'm wrong) that when I said <code>b = a</code> I actually gave b same reference as a, so whatever I do in <code>a</code> I have in <code>b</code>. The thing is that I need to pass the value. So I have the previews <code>a</code>, value in <code>b</code>.</p>
  
  <p>Edit to make the question more clear: How do I pass the value instead of the reference?</p>