title: Need to access a variable outside of a jQuery each loop
body: <p>So I have a json string that Looks like this</p>
  
  <pre><code>var jsonString = '[{"name":"John Smith","uid":1234,{"name":"Susie Something","uid":4567"}]';
  </code></pre>
  
  <p>I'm making a function that will return all the UIDs seperated by commas. So for example:
  1234,4567.</p>
  
  <p>What I do now is this</p>
  
  <pre><code>function getUIDS(json){
  var uids = '';
  parsed = JSON.parse(json);
  
  $.each(friends, function() {
          uids = uids + this.uid.toString() + ',';
   });
   reuturn uids;
  
  }
  </code></pre>
  
  <p>However, nothing returns. How can I access a variable that was created by a jquery thread, outside of the jquery thread.</p>