Got a Restlet that's returning Netsuite page stats...
# suitescript
d
Got a Restlet that's returning Netsuite page stats in <!-- --> comments on some calls and it's stuffing up the JSON.parse ... anyone know how to fix this?
m
I've fought with this a lot.. finally gave up and just do
JSON.parse(response.data.replace(/<!--(.*?)-->/g, ''))
on the consumer
netsuite 1
😩 1
d
Yay for more hacks because of Netsuite bugs. Thanks for the confirmation and regex though :-)
c
I ran into this too and ended up using
response = response.substring(
to chop the extras off.