In my Typescript and SharePoint Search project, I am working on a scenario involving a Collection of Arrays structured as follows:
let _SelectedBusinessUnits =[
{ "fileName": "XYX.doc", "Region": "APAC", "Country":"Australia;China", "LOB": "Auto;Business Auto", SubLOB" : "Standard Auto" },
{ "fileName": "XYX2.doc", "Region": "UKIG", "Country":"UK;Germany", "LOB": "Wordings;Business Wordings", SubLOB" : "Super Wordings;YYY" },
{ "fileName": "XYX3.doc", "Region": "LTAM", "Country":"Japan", "LOB": "Endorsments;Business Endorsments", SubLOB" : "Super Endorsement" },
{ "fileName": "XYX4.doc", "Region": "APAC", "Country":"Australia:China", "LOB": "Auto;Business Auto", SubLOB" : "Standard Auto;XYHC" },
{ "fileName": "XY.doc", "Region": "UKIG", "Country":"UK, Germany", "LOB": "Wordings;Business Wordings", SubLOB" : "Super Wordings" },
{ "fileName": "XYX.pdf", "Region": "LTAM", "Country":"Japan", "LOB": "Endorsments;Business Endorsments", SubLOB" : "Super Endorsement" },
{ "fileName": "XYX.docx", "Region": "APAC", "Country":"Australia;China", "LOB": "Auto;Business Auto", SubLOB" : "Standard Auto" },
{ "fileName": "XYX.html", "Region": "UKIG", "Country":"UK;Germany", "LOB": "Wordings;Business Wordings", SubLOB" : "Super Wordings" },
{ "fileName": "X.pdf", "Region": "LTAM", "Country":"Japan", "LOB": "Endorsments;Business Endorsments", SubLOB" : "Super Endorsement" },]
I define filter conditions in another array of objects.
let filercondition =[{
{"Region": "UKIG"},
{"Region": "APAC"}
{"LOB":'Wordings},
{"Country":'UK'}
]]
The goal now is to filter items based on the values in the filter condition. This involves selecting Region, Sublob, Lob, etc., using respective multiselect dropdowns like Regions, country, lob, and sublobs.
After making selections in the multiselect dropdowns, I need to fetch results, similar to refiner filters in a search function.