In onBeforeRender event, how to check column present or not

I want to check multiple column in single iteration
Please refer below code :

on:{
    onBeforeRender: function(config){        
      var columns = config.header;
      console.log(columns);
      var gdpID=0;
      
      for(var i=0; i< columns.length;i++){  
        // here i want to check multiple column that are present or not in selected list
        if (columns[i].id.match(/_oil/i) ){
            var p=0;
        	columns[i].template = function(obj, common, value) {            
              value=parseInt(value)/parseInt(gdpValue[0]);
              p++;
	          return value;
          }
       	}
      }
      
    }
  },

Not sure about the exact requirements, but when iterating through columns, you get each particular column via index [i] in columns (config.header ) array. Thus, you can work with the source array as you want.