Change to use js array isntead of json