title: Deserializing a JSON into a JavaScript object
body: <p>I have a string in a Java server application that is accessed using AJAX. It looks something like the following:</p>
  
  <pre><code>var json = [{
      "adjacencies": [
          {
            "nodeTo": "graphnode2",
            "nodeFrom": "graphnode1",
            "data": {
              "$color": "#557EAA"
            }
          }
      ],
      "data": {
        "$color": "#EBB056",
        "$type": "triangle",
        "$dim": 9
      },
      "id": "graphnode1",
      "name": "graphnode1"
  },{
      "adjacencies": [],
      "data": {
        "$color": "#EBB056",
        "$type": "triangle",
        "$dim": 9
      },
      "id": "graphnode2",
      "name": "graphnode2"
  }];
  </code></pre>
  
  <p>When the string gets pulled from the server, is there an easy way to turn this into a living JavaScript object (or array)? Or do I have to manually split the string and build my object manually?</p>