Drop down with options from JSON formatted values with filter function
The options are taken from a set of JSON formatted strings, but while adding as options one filter is applied by using a function. This function checks the marks and if mark is >= 70 then only they are displayed as options for the selection. Similarly we check only class=Three as filter condition and show the options for selection.
Watch the check_class function
Selected Student = {{students}} ,
Selected Mark = {{students.mark}}
We have two students of class = Three, so only two options are available for selection as we have applied filter to restrict the options. ( this line is commented in above code )
Similarly another filter is to display students who's mark is equal to or more than 70. Under this filter three students are qualified and displayed as option.