code: function(item1, item2, query) {
              if (typeof item1 === 'object' && typeof item2 === 'object') {
                  query = query || {};
                  for (var prop in query) {
                      if (item1[prop] !== item2[prop])
                          return false;
                  }
                  return true;
              }
              return item1 === item2;
          }
docs: note: not deep query search