title: Get value of parameter in Javascript JSON string?
body: <p>I have a click handler on a jQuery datatables table row - if you click a row a new dialog is launched.  However i am having soem problems getting the ID which I need to pass to my ajax function which launches the pop up.</p>
  
  <p>I have the line of code below:</p>
  
  <pre><code>var rowData = carTable.fnGetData(event.target.parentNode);
  </code></pre>
  
  <p>If I then do the following.</p>
  
  <pre><code>var json = JSON.stringify(rowData);
  </code></pre>
  
  <p>If I then alert(json); I get the following pop up</p>
  
  <pre><code>{"ExtensionData":{}, "CarRegNo" : "ABC 123", 
  "CarNumber": "98765", "CarID" : 1234, 
  "CarName" : "BMW", "CarFaults" : 2, 
  "CarDealerID" : 16, "DealerName" : "WeSellCars"}
  </code></pre>
  
  <p>The only value I need is the 1234 from CarID?  How can I easily get this value?</p>
  
  <p>I tried the following so far with no luck - so without doing the JSON.stringify I just got the key from rowData - when I just alerted the key I could see all the different values, i.e CarID, CarRegNo - however then I tried to alret the actual value of CarID with the code below - but no response comes back - the browser just seems to hang.</p>
  
  <pre><code>        for (var key in rowData) {
              alert(key);
              if (key == 'CarID')
                  alert(rowData[0][key]);
          }
  </code></pre>