B510
Posts: 0
Joined: Wed Jun 04, 2014 2:17 pm

what is correct json value

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

what is correct json value

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.

Return to “Issues”