Tom Mccann
Posts: 0
Joined: Sun Nov 03, 2013 8:11 am

How to parse array of objects in server scripting environment

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?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

How to parse array of objects in server scripting environment

Hello,

Did you follow this doc ?
http://docs.appery.io/documentation/b...

Also please take a look here:
https://developer.mozilla.org/en-US/d...

Could you show us your full script?

Return to “Issues”