Fix structure of the json document

- No need to keep the objects in different flows in arrays