I have two arrays of structs.
array_of_structs1
array_of_structs2
The struct class looks like this, for contextual info:
class Leader < Struct.new(:rank, :user); end
I want to remove the duplicate users from array_of_structs1.
Any assistance would be greatly appreciated!
I’m not sure if I understand. If you want to remove duplicate structs that have the same user in array_of_struct1 use:
If you wan’t to remove entries from array1 that are also in array 2 use