Page 2 of 2

Re: Script Guide

Posted: Thu Jan 17, 2013 9:16 pm
by S@gittarius
Hi Eugene,
Could you please provide some help to parse a JSON string into an object.
I did a lot of testing in WMS using JScript as programing language but without success.
How to make the following working?

Code: Select all

var o, s = '{"p1":"test1", "p2":"test2"}';
     o = JSON.parse(s);
     showmessage(o.p2)
Also something like

Code: Select all

o = {};
keeps on giving 'Expression expected' error.
Regards!