Pull random URL from database that is not in another database

Hi everyone, been running into a sticky issue that I think should be an easy solve (if we can figure it out).

I have two databases: “Thingstodo” and “Didthis”

“Thingstodo” is a general access database that contains a list of URLs of things to do. “Title” is the main field, and then URL is another field within the database

“Didthis” is able to capture whether a user “marked” a certain item from “Thingstodo” as Done. “Userid” is the main field, and then “Title” and “URL” are other fields in the database

I have built a random link generator on my button with this code. It pulls all of the URLs out of “Thingstodo”, pushes them into an array, and then pulls a random URL out of the array. Here is the current code for this generator. VectorImage1 is the “button” on the page

import wixUsers from ‘wix-users’;
import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;
let product
let user = wixUsers.currentUser;
let url
let Links=;

$w.onReady( function () {
return vectorImage1_click()
});

export function vectorImage1_click(event)
{wixData.query(“Thingstodo”)
.find()
.then( (results) => {
results.items.forEach((item)=>{
const allUrls = “/”+item.url
Links.push(allUrls);
$w.onReady( function (){
let test1 = Links[Math.floor(Math.random()*Links.length)];
$w(‘#vectorImage1’).link=test1;
$w(‘#vectorImage1’).target=“_self”;
})
})})}

So… my question is how do I add code to first check if a user has already “Done” a URL and remove that from the potential URLs that could be generated (remove from the array).

Any thoughts?

Site example is here: https://www.boredinchicago.com/thingstodo/Alfred-Caldwell-Lily-Pool
If it helps, I took most of my “Didthis” code from here: https://support.wix.com/en/article/corvid-adding-a-wishlist-to-a-wix-stores-site