collapse array in input json.
reponse in xml format.