I need someone to answer this who knows about the server scripting environment.
I have a server script that makes a successful query to the backend mongo database. The query brings back 2 documents as I expected. So far so good.
If I try to use any of the usual methods to parse the results then the server throws an exception. So far, I've tried to use:
forEach to iterate the array.
JSON.parse
The server exception is as follows:
forEach is not defined, ncode: undefined
JSON is not defined, ncode: undefined
That means that the server environment does't recognise these javascript methods. So my question is:
What method does the server scripting environment support for parsing an array of objects?