This is my stringified JSON object:
{ "bookingsList": [{ "bookingID": 5, "destination": "BSO", "flightDate": "2015-12-07T00:00:00", "flightScheduleId": 113, "origin": "MNL", "passengerList": [{ "availedInsurance": true, "availedMeal": false, "birthDate": null, "carryOnBaggage": 5.1, "checkInBaggage": 4.5, "columnId": 1, "firstname": "Peter", "gender": "M", "lastname": "North", "middlename": "West", "nationality": null, "rowId": "A" }] }, { "bookingID": 6, "destination": "BSO", "flightDate": "2015-12-07T00:00:00", "flightScheduleId": 113, "origin": "MNL", "passengerList": [{ "availedInsurance": false, "availedMeal": false, "birthDate": null, "carryOnBaggage": 4.2, "checkInBaggage": 3.4, "columnId": 2, "firstname": "Mark Justin", "gender": "M", "lastname": "Jalandoni", "middlename": "Manzano", "nationality": null, "rowId": "A" }] }] } So how do I Iterate over the objects in the bookingsList? I will be placing some properties on a table.
EDIT: turns out that for in loop I was using wasn't iterating because I forgot to place a "var" prior to the object variable in the iterable.
bookingsListis just an array so any looping construct will do, a plain oldforloop for example.