title: retrieving json data from mysql and php into jquery
body: <p>I am trying to bring mysql data into jquery by using php, I get the data into a JSON format like this.</p>
  
  <pre><code>{"uid":"33","title":"Apple, Peach, Grapefruit","ing1":"apple","qty1":"1","meas1":"whole","ing2":"peaches \/ halved and","qty2":"2","meas2":"each","ing3":"grapefruit \/ peeled","qty3":"2","meas3":"each","ing4":"","qty4":"0","meas4":"each","ing5":"","qty5":"0","meas5":"each","ing6":"","qty6":"0","meas6":"each","ing7":"","qty7":"0","meas7":"each","ing8":"","qty8":"0","meas8":"each","ing9":"","qty9":"0","meas9":"each","ing10":"","qty10":"0","meas10":"each","servings":"2","benefits":""}
  </code></pre>
  
  <p>using this following code: </p>
  
  <pre><code>require_once'connect.php'; 
  $uid = $_GET['uid'];
  $sql = "SELECT * FROM recipes WHERE uid = '$uid'";
  $result = mysqli_query($conn, $sql);
  
  $num_rows = mysqli_affected_rows($conn);
  while($row = mysqli_fetch_assoc($result)) {
  $data = json_encode($row);
  echo $data;
  }
  </code></pre>
  
  <p>I am using jquery .get to pull it into the web page with this code.</p>
  
  <pre><code>$(document).ready(function(e) {
  var id = location.search;
  uid=id.substring(4);
  $.get('../jqm_juicing/data/get_json.php?uid=' + uid,function(data, status){
  $("#display").append(data);
  });
  });
  </code></pre>
  
  <p>It displays the json data as above.  I would like to be able to access the different elements individually, how do I do that? </p>