Page 1 of 1

what is correct json value

Posted: Thu Jun 05, 2014 2:21 am
by B510

in query service .. I pass the where parameter as follow:

{"username":value}

and got warning.. expected JSON value..

could anybody please advise, what is the correct JSON value ?

please help

thanks


what is correct json value

Posted: Thu Jun 05, 2014 2:40 am
by Yurii Orishchuk

Hi Winanjaya,

Please provide us information about how you set this "where" clause. Screen shots could help a lot.

In common use you should add in following way:

1 Open datasource mapping on request tab.

2 Find "where" request parameters and click "Add JS/Edit JS" button. http://prntscr.com/3ps6w8/direct

3 JS editor appears. Populate it with folowing JS code: http://prntscr.com/3ps84o/direct

precode

//Note you need replace this "534c7e16e4b02ae4f9496fc1" with ID you need.
var objectId = "534c7e16e4b02ae4f9496fc1&quot

var whereObject = {"_id": objectId};

return JSON.stringify(whereObject);

/code/pre

Regards.