Javascript gather results of function


Hello everybody. I’m actually working on a Reactjs application working with FlightXML (so I’m using Javascript), and I just can’t gather information into the code.

Here’s an example: I try to gather informations on flights that arrive at DXB to use it later:

var myTAB = {}

function (data, response) {
  for (var i = 0; i < data.AirportBoardsResult.departures.num_flights; i++) {
    let myFlight =[i]
    var utcSeconds = myFlight.estimated_departure_time.epoch;
    var d = new Date(0)
    myTAB['flight' + i] = {
      id: myFlight.ident,
      airline: myFlight.airline,

The first console.log give me the right object with 15 objects inside but the second one is undefined. What’s happends and how to fix it ? (I’m in Free mode, no pricing)