3

I am looking to query on an array of objects using the Parse Javascript SDK, finding matches on one of these objects' properties based on an array of values I provide.

To explain: I have a Parse object containing an array column. This array in an array of non-Parse objects. As an example, this is the type of data I store:

{ objectId: 'xyxyxyxyx',
  tags: [
    {"name" : "love", "auto" : true},
    {"name" : "war", "auto" : false}
  ]
}

I wish to query whether the tags property matches with an array of tag names I pass in. To demonstrate, here is a pseudo-code example:

var query = new Parse.Query('Songs');
query.containedIn('tags.name', ['love', 'war']);
query.find()

I find that this query works when I run parse-server locally. However, when I use the Parse API, I get the following error:

{"code":102,"message":"Dot notation can only be used on objects"}

Unfortunately, due to the constraints of the client, we cannot migrate to using parse-server just yet.

Does anyone know if there is a way to query on object keys using the existing remotely hosted Parse API.

1
  • Possibly duplicate of stackoverflow.com/questions/33510945/… - sadly it seems like this isn't possible. But worth noting that this seems to work on the new open source parse-server Commented Apr 29, 2016 at 13:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.