Using Dynamic Data in the Javascript editor of Toolbox

I am trying to configure by custom Javascript code using the Toolbox plugin and I’m have trouble.

I am trying to initialize a new array and fill it with a list of “Name” from my type called “Food” in my Bubble Database.

right now it looks like:

let foodNames = Search for Foods:each item’s Type

But the code wont run with that syntax. I assume I’m calling that data incorrectly because it’s a list, but none of the other options make sense. Is it not “each item’s”?

let foodNames = {Search for Foods:each item’s Type}

Just a thought :man_shrugging:

that’s what I did and it doesn’t appear to work.

slight correction, it is actually “Name” not “Type”