I have an array that looks like this:
userInterests [
{
"Status": "Interested",
"$id": "-JncIGjhkuEx1Hq6Lzax",
"$priority": null
}
{
"Status": "Interested",
"$id": "-TDIEGjhkuEx1Hq6Lzax",
"$priority": null
}
]
I need a boolean function that returns true or false if the id matches, so a function like this:
function isAnIDInArray(id) {
}
so that
isAnIDInArray(-JncIGjhkuEx1Hq6Lzax);
Would return true