Python Foreach Key Value Js