Hi Roy,
You should be getting a JavaScript object back, add a console.println(result.toSource()); after the call, you should see something like;
({RHISTORY:{RETURN:"INVALID", RETURNTYPEREQ:1, PERIODREQ:2, TAXNAMEREQ:4, SUBISSUE:5, REFNOREQ:3}})
So,
console.println(result.RHISTORY.PERIODREQ);
Will return 2.
One trick if you have a repeating group returned is that the object will contain an array if there is more than 1 otherwise it will just be a nested object, so you might need some code like;
if (response.Messages !== undefined)
{
if (response.Messages.length === undefined)
{
// only one back;
}
else
{
if (response.Messages.length > 0)
{
for (var i=0; i<response.Messages.length; i++)
{
// handle multiple response.Messages[i];
}
}
}
}
Hope that helps
Bruce