Can anyone help me with this one? I don't know what's going wrong.
Getting data from a json file:
this.categoryTrees = new CategoryTrees();
this.categoryTrees.getCategoryTreesFromJSON();
this.categories = new Categories();
this.categories.getCategoriesFromJSON();
Creating views for it:
//view for startscreen
this.startscreenView = new StartscreenView({collection: this.categoryTrees});
//view for subjectsList
this.subjectsListView = new SubjectsListView({collection: this.categories.where({ category_tree : "onderwerpen" }) });
The second one with the where clause gives me an error: Uncaught TypeError: Object [object Array] has no method 'on'
When I don't put up the where clause it works just fine. In console I am able to perform the where function without any problems.
Do I miss something here?