Is it possible yet to query a key with an array value by a single array element with GoInstant GoAngular? For example, if querying a list of items with the following keys/properties, can I select only items that belong to a single user?
item: {
name: 'Item name',
description: 'A longer description of the item and its details',
category: 'Business',
user_ids: [1,3,7,15] //This is an array of user id's because items
//have a many-to-many relationship with users
}
I tried this query but it does not return anything:
var queryResults = $goQuery('items', { user_ids: 1 }, { limit: 10 }).$sync();
I believe this is the proper syntax according to the MongoDB documentation, but I'm not sure if GoInstant has implemented this operator yet. Any help will be greatly appreciated.
This should work as you expect, it's definitely a bug! Stay tuned, I'll update this Answer once it's been fixed.