I cannot seem to get into an array that I'm needing to get into, in my console it appears as [] but you can expand it and it has more inside of it which I need access to.
I've tried using dot notation and bracket notation to get into the array but with no luck
This is part of my code:
console.log(gameData);
_.each(gameData['1'], (games) => {
console.log(games);
}
This is the array as it first appears in the console:
[]
This is the array expanded in the console:
0: "Games fetched successfully"
1: (6) [{…}, {…}, {…}, {…}, {…}, {…}]
length: 2
I cannot access the array with gameData[1] which is what I need. Can you think of a reason why this is happening? I'm probably doing something simple wrong.