Javascript Object Array Foreach Js Syntax