getting rid of empty objects in json