MQTT and JSON template

I’m using ESPEasy on NodeMCU and Sonoff but sadly there is no native status message back from the firmware when gpio states are changed. In saying that, there is a mechanism for receiving a json status report if I send /ESP01/cmd with a payload of status,gpio,14. In this case, it returns the following:

"log": "",
"plugin": 1,
"pin": 14,
"mode": "output",
"state": 0

As I haven’t written code since 1979!, integrating this into a MQTT switch in HA is beyond me. Could anyone assist with a template that would strip out the gpio pin number and state (0 or 1) when the gpio is polled? I’d be trying to integrate this into the MQTT switch component.

With all of that said, does using this json method ensure that the switch state is polled by HA when HA is restarted?