Output a very simple JSON object instead of a string?

what do you mean? Since it is an object, you can simply access the value using msg.payload.name_of_property

However, since you have chosen a god awful property name and awful topic structure, you are just making things difficult for yourself!

Recommendation:

  1. structure your topics like module/99/info/blahblah
  2. name properties in a way that doesnt require square bracket notation to access them. e.g. current_temperature instead of 22 - Current temperature =

You will eventually realise the benefit of a good topic structure but until that moment of realisation, please take on board what we have suggested here and previously: