Js And Loop Through An Array Php To Json In Python