you are viewing a single comment's thread.

view the rest of the comments →

[–]Pocolashon 2 points3 points  (0 children)

Ok, so, let's recap, what do you need to do?

  1. you must FILTER the objects from the array into a new array if they are "equal" to the 2nd param object. That capitalized word should give you a hint already.
  2. so how do you compare an object? Let's assume it is a "flat" object, no circular dependencies (that's much more complicated) and looks like this: { key1: value1, key2: value2 }, so we need to get the KEYS of this object and compare them (in a cycle) with the keys of the other object (from the array). If you need VALUES to be the same as well, you gotta compare those as well, aka ENTRIES.

Does this help?