Php String Loop Through Object In Js