I fetched data from database so its coming in string format and I want to check this string with my array data
- my string values come like
fish.jpg
animal.jpg
fish.pdf
animal.pdf
mammal_bio.pdf
fish_bio.jpg
fruit_bio.pdf
I want to compare this data with my array which contain
["mammal_bio.pdf","fruit_bio.pdf","animal_bio.pdf","tree_bio.pdf"]
So i want to compare all the array values which contain _bio.pdf and store them
matchedArray=["mammal_bio.pdf","fruit_bio.pdf"unmatchedArray=["animal_bio.pdf","tree_bio.pdf"]