Usually this is super simple but I’m struggling with the response from an API. It has a simple ping function to test the connection and authorisation etc is working fine. It simply returns a message with Hello appended as a prefix.
I have a server connect called ping taking an input, digitally signing and calling the api. All works well and I can see the response in the console but I can’t parse the JSON no matter what I’ve tried.
This is what I send:
This is the response in the console:
If I try to define the schema in Wappler, this is what I get:
Note that “data” is being seen as a text field and there’s nothing under it.
If I try coding the expressions manually, I get this:
The path to just the data shows the whole string correctly but trying to call “message” directly, or trying toJSON or parseJSON all throw the same error "cannot use ‘in’ operator to search for ‘message’:
Has anyone come across this before or got any ideas how I can work with the response? I can’t see why Wappler has a problem reading it.
Node server on Docker (digital ocean).
Thanks all