I figured out my previous question to make an external http call to Steam's WebAPI, but now I'm having trouble parsing the results inside the response.
If I return the response like so:
return { responseContent: response };
Then in the output of the CloudScript I see
"responseContent": "{\"appownership\":{\"ownsapp\":true,\"permanent\":false,\"timestamp\":\"2019-02-27T18:49:25Z\",\"ownersteamid\":\"XXXXXXXXXXXXXXX\",\"sitelicense\":false,\"result\":\"OK\"}}"
I want to access the timestamp value inside this, do a check against that value, then make a few PlayFab API calls depending on the result, but I have not been able to figure out a way to access that value from the result.
Looking through all the relevant questions and docs, it seems like I need to do something with JSON.parse, but I haven't had any success with that so far.
var responseObj = JSON.parse(response); log.debug("test1: " + responseObj);
just printed out "Message": "test1: [object Object]", but I was expecting the JSON equivalent of the string printed above in "responseContent".
Is there a documentation page I'm missing that covers how to use JSON inside Cloudscript, because it seems like that would help significantly. Once I can get the value of "timestamp" into a var in CloudScript I think I should be able to do the rest of what I need pretty easily.