title: Cannot use 'in' operator to search for error
body: <p>Assume I'm making an app where user can upload multiple photos, but they can upload one photo once. I want to append a background image as well as get the file_name value to set the value of the input. I wrote below algorithim but it has error of  Cannot use 'in' operator to search for..</p>
  
  <p>This is the js</p>
  
  <pre><code>$.each('#photo_area div', function(i, obj) {
    i++;
    if (!obj.attr('style')) {
      obj.attr('style', 'background:url(' + data.result.filename + ') no-repeat center center');
      $('input[name="photos' + i + '"]').val(data.result.filename);
  
      return false;
    }
  });
  </code></pre>
  
  <p>This is my DOM</p>
  
  <pre><code>&lt;div&gt;&lt;/div&gt;
  &lt;div&gt;&lt;/div&gt;
  &lt;input type="hidden" name="photo1"&gt;
  &lt;input type="hidden" name="photo2"&gt;
  </code></pre>