gather result in a json object for db saving