The phrasing of my title might seem strange so let me elaborate. I am trying to use Array.find()
to find an object based on weather it has a matching array within it.
Example:
let arr = [
{
innerArray: ["A", "B", "C"]
},
{
innerArray: ["G", "D", "B"]
}
]
arr.find(obj => obj.innerArray === ["A", "B", "C"])
When ran it returns undefined
. If this is not possible are there any alternatives?