Hi - #celigo question here. I'm getting a dataset...
# integrations
s
Hi - #celigo question here. I'm getting a dataset from a third party product that has \ preceding each JSON key. (It's the JSON incremental that I'm interested in and I've only put in a snippet) What's the best way of converting this into JSON that I can use further down the line (in this case to create items in Netsuite). I've tried using a regex in a presave page webhook. That looks OK in the console but somehow the backslashes make their way back in (maybe the parser thinks it's a string?). Any help gratefully received. Many thanks - var input = options.data[0].rest_incremental var output = input.replace(/\\/g, ""); options.data[0].myData = output; { "data": [ { "id": "centric%3A%2F%2Fvw_NS_Attributes_incremental", "node_name": "rest_incremental_result_node", "active": false, "code": "", "defect_category": "", "tags": [], "modified_by": "C1047", "_modified_at": "2023-11-10T164136.737Z", "rest_incremental": "[{\"Colorway.Node_URL_ID\":35131,\"Colorway.NodeURL\":\"C26154\"
1
Hi - solved it. Just needed to JSON.parse() in case this is of help to anyone else.