returning deleted last version to a json object instead of a string