Closed Akia85 closed 7 years ago
JSON Object; { "id": 1, "Destination": "Mediterranean", "DestinationID": "192eefba-37e5-4f64-89dd-dcb4165c541d", "DepartureDate": "2014-03-21T03:27:49 -01:00", "Ship": "Explorer", "ShipID": "f2de6587-5e1a-4f80-aaad-939718356d19", "CruiseType": "Expedition", "Duration": 13, "AllInclusive": false, "WaitList": true, "FareFrom": 6741, "Currency": "$", "Cities": [ "culpa", "dolor", "nisi", "cillum", "ipsum", "tempor", "deserunt", "adipisicing", "excepteur", "enim", "id", "elit", "aute", "nulla", "laboris", "esse", "laborum" ], "VoyageCode": "{{integer(100, 9999)}", "Features": [ { "id": 0, "name": "Exclusive offer" }, { "id": 1, "name": "Venetian" }, { "id": 2, "name": "Diving" } ], "url": "test.com" },
When I put my tag like this :
Is there a way to display all "Features" name in the
Thank you for your help,
You can use like this to get all Features
<%= Features.map(function(f) { return f.name }).join(', ') %>
Work perfectly ! Thank you for the fast answer !
JSON Object; { "id": 1, "Destination": "Mediterranean", "DestinationID": "192eefba-37e5-4f64-89dd-dcb4165c541d", "DepartureDate": "2014-03-21T03:27:49 -01:00", "Ship": "Explorer", "ShipID": "f2de6587-5e1a-4f80-aaad-939718356d19", "CruiseType": "Expedition", "Duration": 13, "AllInclusive": false, "WaitList": true, "FareFrom": 6741, "Currency": "$", "Cities": [ "culpa", "dolor", "nisi", "cillum", "ipsum", "tempor", "deserunt", "adipisicing", "excepteur", "enim", "id", "elit", "aute", "nulla", "laboris", "esse", "laborum" ], "VoyageCode": "{{integer(100, 9999)}", "Features": [ { "id": 0, "name": "Exclusive offer" }, { "id": 1, "name": "Venetian" }, { "id": 2, "name": "Diving" } ], "url": "test.com" },
When I put my tag like this :
Is there a way to display all "Features" name in the
Thank you for your help,