I am trying to manipulate this string so I can break out the relevant components into individual variables.
In SharpTools, I can issue the HTTP GET request successfully, but I can’t work out how to get the whole string (or the components) into a variable.
$context.response.status returns 200 showing that the command executed successfully.
When I select Variable->Context Variable->Response->HTTP->Response Data, it then asks me to input an object.property. Typing the variable names in the string (e.g. “P_PV”) doesn’t work, and I can’t seem to just ask for the whole thing. How do I get the whole string?
I have tried using (), “”, #, * and any other version of a null I can think of.
As a test, I just took the payload from your first post and put it into a GitHub Gist to simulate the response (intentionally causing it to have an incorrect ‘text’ content type to test that too) and the rule executed as expected:
The challenge with using substrings is the position and length of the content might change. It looks like you solved the position part of things with the indexOf() method (nice move!) which leaves you with the potential for the length of the content to change.