I have array list of items like the below
let sourceList: SourceList[] = [
{
Value: "L7",
Name: "L7",
IsVisible: false
},
{
Value: "LO",
Name: "LO",
IsVisible: false
},
{
Value: "L3",
Name: "L3",
IsVisible: false
},
{
Value: "LS",
Name: "LS",
IsVisible: false
}
]
code tried so far
if(this.sourceList.indexOf("L7",0) != -1 && this.selectedSources.indexOf("LO",0) != -1 ){
}
but getting an error at "L7"
I am adding items from this souceList array to another array say array2 one by one .. is there any way to check whether the item from the souceList array is in array2 or not ..
I need to do some process if item "L7" and "LO" is in array 2 but I am not able to figure out how can i search both the items at a time in array 2 .. I am using angular 4 ..
Could any one please help on this, that would be very grateful to me