title: Check if an object with index is in array
body: <pre><code>$.each(constructions, function(i,v) { 
  if ($.inArray(v.name, map[ii].buildings) == -1) {//stuff}
  };
  </code></pre>
  
  <p>Where <code>constructions</code> is an array of objects, each with a unique name. <code>map[ii].buildings</code> is an array containing some of these objects. I want to iterate each object in <code>constructions</code>, checking if its name parameter appears in the objects of <code>map[ii].buildings</code>.</p>
  
  <p>The above code works if the each element in the <code>map[ii].buildings</code> array is just the text string of the object name, but not if the element is the entire object.. close, but no dice >.&lt;</p>