JavaScript remove object from array if value exists in other array
<p>I am using Firebase, so if there is a more efficient way to structure this data in order to be able to query only the cards that have not already been viewed by the logged in user, I am open to going that route as well. Right now I am trying to do the filtering after the fact.</p>

<p>I have an array of all cards included in my application that looks like this:</p>

<p><a href="https://i.stack.imgur.com/THjJf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/THjJf.png" alt="enter image description here"></a></p>

<p>I have a second array that holds information on all the cards the user has already seen. I want to be able to look through both arrays, and if the cid in Array two matches the $id in Array 1, then remove that object entirely from Array 1.</p>

<p><a href="https://i.stack.imgur.com/pg2b0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pg2b0.png" alt="enter image description here"></a></p>