Js Map Foreach Is Not A Function