How to return from a $.each operation? (jQuery)
<p>Example:</p>

<pre><code>var t = $.each(templos_cache, function(f,g){
 $.each(g.requer, function(h,j){
  if (parseFloat(g.id) == id){
   alert(j.nome); // OK, return 'afrodite'.
   return j.nome; // wrong, return [Object object].
  }
  });
  return '';
 });
</code></pre>

<p>Looking at the code we can see the problem... i can do a set in a variable out of scope but i think that can exist some more elegant way to do this.</p>
