Cant access Array of Objects (help!) [solved]

I’m doing the Twitch API project, Codepen
I want to get the details of channels from API, and store useful data in objects, and then push that objects to an array, because I’m planning to use that array later in the project.

here how I declared an array, (project code line 4)

var channelObjs = [];

This is how I created an object and pushed it to the array, (line 13)

var channelDetails = {                     
            "live" : false,
            "name" : offlineChannel.display_name,
            "secondName" :,
            "logo" : offlineChannel.logo,
            "link" : offlineChannel.url

the problem is I cant access this array,
when I run console.log(channelObjs) in project code it shows the array, but console.log(channelObjs[0]) returns ‘undefined’. please help me

There are no issues with push() LOL :see_no_evil:. this happens because console.log(channelObjs) runs before getJSON() method finished.