I'm trying to implement a function to select multiple items from one and add/remove to another using typescript.
//data of the display list, each element has same value for text & value.
private listA: any = {};
private listB: any = {};
//string array contains the list of name selected
private selectA: string[] = [];
private selectB: string[] = [];
private addClick: void {
//remove all from listA that match name found in selectA
//add to listB all name found in selectA
}
How would I go about to implement this function? I already manage to get the data (listA & listB) to populate my list so that is not an issue, my issue is to prepare the data properly for it.
I'm new to typescript & javascript so the syntax is what giving problem now. I tried to work with Object.assign(), delete and couple of other functions I found but no luck so far.

listAandlistBare arrays? They're typed as objects right now.listAmore concise if you want.this.listA = response.data.map(val => ({ text: val.name, value: val.name }));