I figured out how to make it in key value pair. But I tried getting values through different but none of them works.
This is how my map looks like. I am unable to get the values based on key.
Here is the code I am using
var storevalue = new Array();
storevalue = new Map(Object.entries(JSON.parse('{!filterModelstr}')));
Изображение показывает, как выглядит storevalue
.
cols.forEach(function(col) {
var filterInstance = gridOptions.api.getFilterInstance(col.getId());
// Set the model for the filter
filterInstance.setModel({
condition1: {
type: storevalue.get(col.getId()).storeTypeOperator,//Giving error at ths point
filter: storevalue.get(col.getId()).storefiltervalue,
},
operator: 'AND',
condition2: {
type: storevalue.get(col.getId()).storeTypeOperator,
filter: storevalue.get(col.getId()).storefiltervalue,
},
});
});
Я планирую присвоить значения типу и фильтру, чего не происходит . Как я могу решить этот сценарий.