cleaning JSON for action pattern