Hey all, I’ve been struggling with this for a few hours now. I have no idea how to use an entry from my database as an object in my code. I have javascript code running in an html element and i want to pass a list of objects from my databse do it. However, if i try to do it as dynamic data by doing a search for, i can only pass one field from my database as a list, rather than every entry as an object.
This is the code i want to use it with:
let gData = []; // Initialize an empty array
// Retrieve data from Bubble database
const bubbleData = []; // ***This is where i want to get all the entries from my database which have fields for "name" , "location" etc.***
// Loop through the Bubble data and format it for visualization
bubbleData.forEach(item => {
const dataItem = {
name: item.name,
markerID: item.markerID,
lat: item.latitude,
lng: item.longitude,
size: 20,
color: "beige",
};
Would appreciate any help