Created
February 22, 2020 19:55
-
-
Save yairEO/7baecc7aec646cf01fb32a513bcf60da to your computer and use it in GitHub Desktop.
Check if an Array includes a specific Object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arrayIncludesObj(arr, obj){ | |
return arr.some(arrObj => JSON.stringify(arrObj) == JSON.stringify(obj)) | |
} |
Author
yairEO
commented
Feb 22, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment