Home > other >  Check if two arrays have an object with the same property
Check if two arrays have an object with the same property

Time:04-21

Here's my goal: compare two objects and figure out if there is 1 or more items in common. If there are 1 or more in common, return true otherwise (no items in common), return false.

Current issues: I'm trying to use the .some() method with 1 object from an API and 1 object that's local, but a bit confused why it's not working...any ideas? It should return true since John is in both objects, but it returns false

  • Related