How iterate in an array with objects

I’m struggling find a way to iterate in my array with objects. How iterate in this?
My array have 8 Usr objects.

I have try iterate with forEach method.

function show_data(){
Users.forEach(function(objs){
  alert("It WOrk 1!");
    if(objs.live == true){
      twitchContainer.innerHTML += "<li>"+objs.name+"<img src='"+objs.image+"'>" +"<p>"+ "ici"+"</p>"+"</li>";

       }else{
         alert("It WOrk 2!");
   }
  });
}
show_data();

Can you explain what you mean by iterate your array with objects?

I try iterate in the Users Array to get user by the “live” propreties.

I looked at your Codepen and the Users array is empty, so the code inside the forEach callback function will not execute.

Oh so its empty when my function try to iterate in it?
Its hard understand how callback for each step. :sweat_smile:

Thank’s for your help btw! :slight_smile:

Yes, the Users array is empty before the forEach line. Put a console.log in to confirm.