I am using the jQuery plugin DataTables + ColVis to show tables.
I have to get an array of the indexes of the columns which the user has chosen to display (this information will be used for creating a customizable table for export).
For example: A user chooses to display only Browser and Platform(s) from the table here. I need to obtain [1,2].
Any ideas?
EDIT TO PREVIOUS ANSWER
I figured out a better way using datatables API: