So I need to remove links that id matches the id in array. Heres the code:
for(let i = 0; i < allyList.length; i++) {
if ( $.inArray(allyList[i], allyArray) > -1 ) {
// In this if statement I'm checking if id's from allyList matches id's allyArray
}
}
This code ^ above works fine. It checks if ID's matches. But now I have this link:
<a href="/join-alliance/{{this.title}}" id="{{this._id}}" class="btn btn-success join">Join</a>
These links id is all the same as allyList id's. I need to somehow get these links in array and then check in that if statement above if the links id's matches the ones in allyList. And if the id matches I need to remove that link.