I have a JSON Model say:-
var currency = new sap.ui.model.json.JSONModel();
var currenices = [{"name":"Indian National Rupee", "code":"INR"},
{"name":"Euro", "code":"EUR"},
{"name":"U.S.Dollars", "code":"USD"},
{"name":"Chilean Peso", "code":"CLP"},
{"name":"New Zealand Dollar", "code":"NZD"}]
currency.setData(currenices);
How can I apply "new sap.ui.model.Filter(sPath, FilterOperator, value1, value2,...,...)" to this model. I want to get the currency name given the code. I know this can be done during data binding, but I want to do this directly to the model.
I applied the 'filter' function to the array and was able to filter the name given the code. Is It possible to do the same using model.Filter?
Thanks in Advance,