Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Parsing JSON returned from nlapiRequestURL
I'm trying to figure out how to parse JSON data returned to a client side script into variables that I can use. Apparently the JSON.parse() command throws an unexpected error (SyntaxError: Unexpected token: n (adhoc$-1$debugger.user#11))
I can see via debugger that my response is good and in the proper format.
var keyword = "xxx";
var url = 'http://someurl.com/search?';
url += 'q=' + encodeURIComponent(keyword);
var response = nlapiRequestURL(url, null, null, null);
var arr = response.getBody();
var address = JSON.parse(response);