How do save JSON values that I'm receiving for MQTT protocol?

Could you show me an example of how to write in the switch, please?