Retrieve listing data from database in JS