I've been struggling to get my head around doing this after hours of research and in theory it's quite simple; all I need to do is display data from a specific record in a database - in this case, the 'desksAvailable' for each 'roomID'.
Below is some sample data from the database.
and here is an example of where the data from each record will be applied (for a simple hotdesk booking system):
I've tried using the "Connect to Data" feature and pieces of code I found from forums for each [no of desks] text field, but that only showed the 'desksAvailable' value for the first roomID (as expected).
The room title in each box e.g. "Room 1" will remain static but the "Book Desk" buttons will be specific to each room.
If possible, I'd also like to create a condition where if there are no desks available for a room, the box background color turns red and hides the "Book Desk" button.
I'm used to doing this sort of thing in PHP, but not JS/Wix Code.
Any guidance would be greatly appreciated!