I'm currently dealing with two arrays: one contains displayed columns and the other contains objects retrieved from a database, with more attributes than the displayed columns.
displayedColumns = ['CompanyName','Ticker', 'Id', 'Name', 'Date',
'Spot', 'PreviousTradeDate', 'PreviousSpot', 'FPrice', 'Status']
data = [ {CompanyName = "..." Ticker = "..." other attributes........}
{.......} ]
I am facing issues filtering the data
array to only show the attributes and values from the displayed columns
array (excluding the other attributes).
I am unsure how to achieve this using the map()
function, especially when I need to filter by more than one value.
Any help would be greatly appreciated. Thank you!