Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
See if each object in an array is in another array of objects
my_objects.each do |my_object|
if my_other_objects.any?{|my_other_object| my_other_object.Name == my_object.name}
# do something if we found one
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.