This might be easy but I am struggling with this at the moment. I need to check inside a function if the there are duplicate values in the json object.
My Object :-
"controls": {
"score": "AppId",
"title": "CountryCode",
"onesubtitle": "CountryName",
"twosubtitle": "Region",
"summary": "CountryHead",
"keyword": "Region"
}
Object.values(this.controls).forEach(val => {
console.log(val);
});
I need to check and return boolean if the values are duplicate in the object like the values bold below.
"controls": { "score": "AppId", "title": "CountryCode", "subtitle1": "CountryName", "subtitle2": "Region", "summary": "CountryHead", "keywords": "Region" }