Hi, I'm trying to add a new data source to AmiQuote. The data is in JSON format, so I'm using Javascript to parse the JSON to CSV format.
I verified the code in both IE and Chrome. They both worked very well.
Somehow when I paste the code into AmiQuote and click the Request button under Debug tab. It throws an error: Script error 0, Expected ';', Microsoft JScript compilation error.
here is my code:
there is no such thing as of operator in Microsoft JScript
Correct code should be:
for(line in arr) {
You need to understand that Javascript has many flavors and version and MS JScript (a part of Microsoft Active Scripting Technologies, is NOT the same as you have in the browser). It is used by Windows Scripting Host and is pretty old and does not have many new additions that for example Node.js has.
MS JScript used by AmiQuote is version 5.8 and is compatible with following spec: ECMA-262 3rd edition + ECMA-327 (ES-CP)[note 3] + JSON (RFC 4627)