I have an array in which I'm getting duplicating string that is matching within the other string how can I check and remove from others strings if have
This is the array that I'm getting and I want to remove the duplication string from the array.
"titles": [
"Financial Analyst",
"Analyst",
"Respiratory Therapist",
"Therapist",
"Healthcare Specialist",
"Specialist",
"Liaison",
"Business Development Analyst",
"Development Analyst",
"Sales Team",
"Data Analyst",
"Administrator",
"Auditor",
"Director",
"Director of Events",
"Controller"
]
let me define which I want.
I have two strings in the array
Financial Analyst & Analyst I want to remove the second one from the array because this string comes in the first string.
also like one more example Healthcare Specialist & Specialist the second one I want to remove.
Thanks in advance.