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.