Fixed the json/xml response with output as array