I would check out the client documentation. The action method has three examples that can be of help. The second two show how to handle the response of an object.
You can also check out some widgets on github. The custom string widget should be a good example. This will add text to a page based on the return value of a microflow (lines 70 – 93).
Hope this helps!