Find property and value pairs between two objects
As @Pimgd explained, it's not good to recreate an anonymous function in every iteration of a loop. Move the function outside of the loop:

function where(collection, source) {
  var arr = [];
  var keys = Object.keys(source);

  function match(x) {
    return x in collection[i] &amp;&amp; source[x] == collection[i][x];
  }

  for (var i = 0; i &lt; collection.length; i++) {
     if (keys.every(match)) {
       arr.push(collection[i]);
     }
  }

  return arr;
}


I suggest to go one step further.
Instead of creating an array and appending to it,
you can benefit from the Array.prototype.filter method:

function where(collection, search) {
  function filter(item) {
    function matchSearchValue(key) {
      return key in item &amp;&amp; search[key] == item[key];
    }
    return Object.keys(search).every(matchSearchValue);
  }
  return collection.filter(filter);
}


Finally, notice how I renamed everything to better explain their purpose.