I'm using the Datasource object to retrieve data from a remote (JSON) datasource which I would then like to filter client-side without doing any round-trips back to the server. I get the results fine but I'm unable to clear and reapply filters, my code is:
dsReport.fetch().then(function(){
var view = dsReport.view();
dsReport.filter({field:"Occupation", operator: "equals", value:"DEVELOPER"})
console.log(view[0].NumberOfStaff); //Outputs 13 which is correct
dsReport.filter({}); //Remove the previous filter??
dsReport.filter({field:"Occupation", operator: "equals", value:"MANAGER"})
console.log(view[0].NumberOfStaff); //Outputs 13, should be 22, assuming new filter isn't being considered
})