$in operator titanium sdk not working #appcelerator

68 Views Asked by At

My code looks like this

Cloud.Events.query({
            where: {
            tags : {'$in': ['movie','netflix']}

        }   

        }, function (e) {//continues

and on the arrowdb backend I have pushed in values to make tags for the event look like [" ","movie","netflix"]. Its not picking up the event. I'm using Titanium SDK syntax.

1

There are 1 best solutions below

1
On

I also had some trouble with this in the past.

I solved it playing with syntax.

At the end, I reached a solution like:

var where = null

where.tags = {
    '$in': [your array]
};

Cloud.Events.query({
    where: where
}, function (e) {});

I hope it helps you.