Array Foreach Method In Js Object