I need a function that changes the parameters that accept an array, it accepts 'abbreviation' and 'description' has to read 'optionStringValue' and 'optionStringText'
I have a Select2 that should load me every month of the year but it does not load them because the array I have accepts other parameters that the LoadDataSelect that I have does not accept
this is the code I have
that should carry me the months
pLoadDataSelect($('#select_mes'),fGetArrayMonth(),{
'optionStringValue' : 1,
'optionStringText' : 1,
'functionData' : fDataSelectCountBudget
});
Of this arrangement
function fGetArrayMonth() {
var array = [];
array.push({
'code' : 1,
'abbreviation' : 'ene',
'description' : 'ENERO'
});
array.push({
'code' : 2,
'abbreviation' : 'feb',
'description' : 'FEBRERO'
});
array.push({
'code' : 3,
'abbreviation' : 'mar',
'description' : 'MARZO'
});
array.push({
'code' : 4,
'abbreviation' : 'abr',
'description' : 'ABRIL'
});
array.push({
'code' : 5,
'abbreviation' : 'may',
'description' : 'MAYO'
});
array.push({
'code' : 6,
'abbreviation' : 'jun',
'description' : 'JUNIO'
});
array.push({
'code' : 7,
'abbreviation' : 'jul',
'description' : 'JULIO'
});
array.push({
'code' : 8,
'abbreviation' : 'ago',
'description' : 'AGOSTO'
});
array.push({
'code' : 9,
'abbreviation' : 'sep',
'description' : 'SEPTIEMBRE'
});
array.push({
'code' : 10,
'abbreviation' : 'oct',
'description' : 'OCTUBRE'
});
array.push({
'code' : 11,
'abbreviation' : 'nov',
'description' : 'NOVIEMBRE'
});
array.push({
'code' : 12,
'abbreviation' : 'dic',
'description' : 'DICIEMBRE'
});
return array;
}