I have a collection called $applied_exams which contain following data
Collection {#2033 ▼#items: array:4 [▼
0 => {#2035 ▼
+"post_id": 1
+"designation_id": 9
+"token_number": 438
+"name": "TECHNICIAN TELECOM"
+"adb": "2074-06-23"
+"ContainMultiplePost": false
+"Group_id": 8
}
1 => {#2034 ▼
+"post_id": 11
+"designation_id": 1
+"token_number": 740
+"name": "DEPUTY MANAGER TELECOM"
+"adb": "2074-06-25"
+"ContainMultiplePost": false
+"Group_id": 1
}
2 => {#2040 ▼
+"post_id": 3
+"designation_id": 12
+"token_number": 2810
+"name": "ASST. BUSINESS OFFICER"
+"adb": "2074-10-24"
+"ContainMultiplePost": true
+"Group_id": 7
}
3 => {#2039 ▼
+"post_id": 2
+"designation_id": 8
+"token_number": 2811
+"name": "ASST. ADMINISTRATIVE OFFICER"
+"adb": "2074-10-24"
+"ContainMultiplePost": true
+"Group_id": 7
}]}
I want to unset the data with duplicate group_id. I only want one data of one group_id. In this case I just want the $applied_exam[3] to be removed because group_id is same as $applied_exams[2]. Please help. Thanks