Removal of nesting of json data