title: Dynamically Assign Variables after looping through JSON object
body: <p>Probably a beginner question, but I have an array json object that I'm looping through to pull out certain values.  If these values equal "NO", then I want to hide a div using jquery.  This should be simple enough, but I don't know how many items the array can contain so I'll have to make sure to dynamically grab all of the number/value pairs.</p>
  
  <p>My JSON is similar to below:</p>
  
  <pre><code>"account" : [{
      "ID":1,
      "transferAllowed": "NO"
  },{
      "ID":2,
      "transferAllowed": "YES"
  }]
  </code></pre>
  
  <p>My loop:</p>
  
  <pre><code>//define variable that references the values I need from the json object
  var account = this.json.account;
  
   for ( var i = 0; i &lt; account.length; i++ ) {
      //compare all values of transferAllowed however many that may be.  If they all equal No, then hide div with jquery $("#div").hide()
  
  }
  </code></pre>
  
  <p>Any help is appreciated.  Thanks.</p>