You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require(["dstore/Memory"],function(Memory){varemployees=[{name:"Jim","dep.artment":"accounting"},{name:"Bill","dep.artment":"engineering"},{name:"Mike","dep.artment":"sales"},{name:"John","dep.artment":"sales"}];employeeStore=newMemory({data:employees,idProperty: "name"});employeeStore.filter({"dep.artment":"sales"}).forEach(function(employee){// this is called for each employee in the sales departmentalert(employee.name);});});
The text was updated successfully, but these errors were encountered:
This is by design to enable shorthand query syntax for nested properties. The filter employeeStore.filter({ 'dep.artment': 'sales' }) would work with the data:
If you need to handle property names that contain a period, you'll have to provide a custom _createFilterQuerier implementation. For a full reference implementation look in dstore/SimpleQuery.
The code below, which is an incomplete implementation not suited for use, demonstrates how to handle the specific case in this issue:
Keys with a dot do not work with filtering.
The text was updated successfully, but these errors were encountered: