title: Getting values from 2 sets of data from JSON file
body: <p>I am parsing data from a json file and converting to a HTML table, this is done, but I have 2 sets of data in the JSON file. The second one is to get the direct value. I dunno where i am doing wrong, is the JSON format or the the way i am trying to get the values. Can anybody guide me on how to achieve this ??</p>
  
  <p>//Json File  format</p>
  
  <blockquote>
    <p>{ "posts":  [ { "title":"12",
    "answer":"55.5" }, { "title":"123",
    "answer":"66.6" },] "author": [ {
    "book":"12", "date":"55.5" },] }</p>
  </blockquote>
  
  <p>// Script</p>
  
  <pre><code>$.getJSON("wc.json",function(data)
  {
  alert(author.book);
  alert(author.date);
  $.each(data.posts, function(i,data)
  {
  var faqs =
  "&lt;tr&gt;&lt;td&gt;"+data.title+"&lt;/td&gt;&lt;td&gt;"+data.answer+"&lt;/td&gt;&lt;/tr&gt;";
  $(faqs).appendTo("#faq tbody");
  });
  }
  );
  return false;
  });
  </code></pre>