Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have array of dictionary. If duplicate data is present in the array of dictionary then a flag to be raised with the element name which is duplicate.

The array of dictionary is below:
[[project_code: 1, lob: lob_1], [project_code: 1, lob: lob_1], [project_code: 2, lob: lob_1], [project_code: 3, lob: lob_1]]

Here we need to loop through and find if same project_code and lob is same, then it would return which all project_code which are duplicate.

Duplicate data means the pair of project_code and lob value should be same.

In the above array, if we go through then it should return project_code : 1


If anyone can write a code in Swift ..

Thanks in Advance.
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900