Is it possible to directly parse a nested json response returned by getrestproxy in a cxone studio snippet without using intermediate string manipulation? i am calling an internal service via the rest proxy action to fetch user metadata. the response is a valid json object with nested arrays. when i assign the response to a variable using the assign action, it treats the entire payload as a string. accessing fields like response.data.items[0].id fails because the parser does not recognize the json structure. i have tried converting the string to an object using standard javascript methods within the snippet, but the sandbox environment restricts external libraries. here is the snippet logic i am using:
rest_proxy = getrestproxy()
rest_proxy.url = 'https://internal-api/v1/user/123'
rest_proxy.method = 'GET'
result = rest_proxy.invoke()
user_data = result.response
// expected: { 'data': { 'items': [ { 'id': '1' } ] } }
// actual: '{"data":{"items":[{"id":"1"}]}}'
the api returns 200 ok. the issue is strictly within the studio snippet execution context. how do i deserialize this string into a usable object or array within the snippet constraints?