Always getting not null object even though there are no objects with these parameters;

@dknutsen well I am even more closer now thanks to you! :slight_smile: But, there is still one bug. It’s like he filters the first subject correctly and every next time he still keeps reference to the same subject and insert the marks (that is grades) in that subject. Do you have any idea why? Here is my snippet of code, I would appreciate if you could look one more time… :slight_smile:

unesiOcenu(val1, val2){
			var student ="student", val1);
			var subject ="subject", val2);
			var mark = this.get('ocena');
			alert(student.get('firstName') +  " " +  student.get('lastName'));
			var grades ='grade');

			grades.find(function(item, index){
				const student2 = item.get('student');
				const subject2 = item.get('subject');
				if(student2 === student && subject2 === subject){
					return true;
				return false;

			}else{'grade', {
					marks: [mark],
					student: student,
					subject: subject 

-My models, template and sample of firebase data are in this link: Is there a way to check if some record exists before I create a new one?