Rework structure of json output