title: navigating JSON with jQuery
body: <p>I saw <a href="https://stackoverflow.com/questions/5288833/how-to-search-json-tree-with-jquery">this answer</a> dealing with getting data from JSON. I'm trying to do almost the same, but my JSON is structured differently as far as arrays/objects and I'm not sure how to parse it the same way.</p>
  
  <p>My JSON is in this format and I'm trying to write a function to find certain elements based on the linked question, but without keys for the elements in the json, not sure how to target things. Or do I need to try and rework the out put of my json? (which is being created by json_encode from a modified codeigniter db query.</p>
  
  <pre><code>$(function() {
  var json = [
    {
  
      "answer": [
  
        "4555"
  
      ],
      "answer_string": "4555|",
      "qid": "70",
      "aid": "742"
    }, 
   {
  
      "answer": [
  
        "monkeys",
        "badgers",
        "monkeybadgers"
  
      ],
      "answer_string": "monkeys|badgers|monkeybadgers|",
      "qid": "71",
      "aid": "742"
    }
  ];
      $.each(json[], function(i, v) {
          if (v.qid= "70") {
              alert(v.answer[0]);
              return;
          }
      });
  });​
  </code></pre>
  
  <p><a href="http://jsfiddle.net/cutcopypaste/jQmyf/" rel="nofollow noreferrer">jsfiddle</a></p>
  
  <p>I need to find answer[0] where qid matches a certain number.</p>