I finally got my where query working with a local storage item with the following javascript in the where JS tab on the input mapping on my service request:
//Get username in JSON format for where clause
var username = localStorage.getItem("username");
var whereObject = {"to_username": username};
return JSON.stringify(whereObject);
Now I would like to learn how to do an where $and query but can't seem to make it work.
I need where {"to_username": username}; AND {"activity":"active"}
I tried this code but it does not work:
//Get username in JSON format for where clause
var username = localStorage.getItem("username");
var whereObject = {"$and": [{"username": username},{"activity": "active"}]};
return JSON.stringify(whereObject);