Hide or show columns basis manual selection

Hi,

I am trying to figure out a way to map the columns in a table based on what is selected in a multi-select dropdown component.

I would assume this requires me to somehow map the columns and the multi-select value and control the hidden property of the columns basis selection in the dropdown.

I managed to get the column names using this function:

{{Object.keys(formatDataAsObject(table1.data))}}

But this is just isolated the column names but doesnt create any mapping.

Info: I am using the new table component