I’m not sure right now, but I think you can add a channel to your MQTT item via the web interface. If you select the On/Off switch and click on “Show advanced” you can assign a “Custom On/Open Value” and “Custom Off/Closed Value”.
At “Incoming Value Transformations” then “JSONPATH:$.action”.
With this method, however, only two values can be processed, so you would have to create several if needed. But then the way over a rule would be easier.