Hi,
I have been trying to display some titles from a media gallery within a database. I can get the code to work for 1 object but not any others unless I retrieve them individually.
$w('#accTtlTxt').text = accommItem.hotel[0].title + "Accommodation price (per person) - £" + accommItem.hotelPrice;
The above code works but what I’m trying to achieve are if there are 3 objects within the array, then it will display all of the .title from the 3 entries. The below code does this but if I have another trip that has say 2 or 4 items then the code returns ‘undefined’ Basically I’m looking for the code to display all of the ‘title’ entries.
$w('#accTtlTxt').text = accommItem.hotel[0].title + "\n" + accommItem.hotel[1].title + "\n" + accommItem.hotel[2].title + "Accommodation price (per person) - £" + accommItem.hotelPrice;
Anyone have any ideas? Thank you