working in javascript with objects within  arrays and using the forEach to loop through them