You need to sign in to do that
Don't have an account?
Rajath Kundapur 17
In LWC, How to check duplicate value in array
I have 2 array
-> The First array consists of all the values.
-> In the second array, consist of selected values Here I need to filter the value which is already present
All Answers
Don't know the correct answer, but I would use a forEach() method and check if the first array contains thiselement as below:
secondArray.forEach(elem => {
Thanks Danish
The solution is working. Could you please suggest me how to remove duplicate elements from the second array