Quering in BaaS from node app

Hi,

I am trying to query on a specificBaaS collection called employeesfrom node.js using usergrid module as below

function getEmployeeListsById(emp, req, res)

{

var opts = {

type : 'employees',

qs:{ql:"empoyeeId= '123' "}

};

But instead of hardcoding the empoyeeId to 123 in the query I want to pass it as a variable but I am unable to use a variable refernce here. Kinly let me know if there is any way to use a variable reference here.

Thanks!

Solved Solved
0 1 200
1 ACCEPTED SOLUTION

Hi, Try this:

{

var opts = {

type : 'employees',

qs:{ql:"empoyeeId= '"+variablename+"'"}

};

View solution in original post

1 REPLY 1

Hi, Try this:

{

var opts = {

type : 'employees',

qs:{ql:"empoyeeId= '"+variablename+"'"}

};