var labels = { loadGrup: function (grup, data) { if (typeof dbLabels === 'undefined') { dbLabels = {}; } dbLabels[grup] = data; }, getLbl : function (grup, index, inc) { let result = ""; if(typeof inc !== "undefined" && inc != null && inc !== ""){ grup = grup + "." + inc; } if (typeof dbLabels !== 'undefined'){ if (typeof dbLabels[grup] !== 'undefined'){ if (index < dbLabels[grup].length) { result = dbLabels[grup][index]; } } } return result; } };