i have an array of object inside another object. when i iterate this array with
t.schedules.forEach(function(item) {
console.log(item[index]);
});
it shows error Uncaught TypeError: t.schedules.forEach is not a function.
but i am able to get it with t.schedules[index];



tget populated with respect to yourforEach?schedulesis, it is not an array (or you're using a really old IE).t.schedulesmay not be an arrayvar a = {1: 'Hello'};then it will also returnHellowitha[1]. Butaisobjectnotarray.