I've implemented an apex algorithm to upload a CSV file into Salesforce. In the CSV file there are 7 necessary columns and I keep all of them in a list of strings:
private List<String> necessaryColumns = new `List<String>` {'column01' , 'column02', 'column03', 'column04', 'column05', 'column06', 'column07'};
I need to validate by column names.
I do not need to check the amount of columns.
If one of the 7 columns is missing in the CSV file, then I need to show a warning message to the users.
Please advise how to validate by column name?