From a Hash relations I want to remove some entries and keep the ones I removed in another Hash obj.
I found Hash.delete_if and did:
obj = relations.delete_if{|k,v| v[:value] == 1}
However, instead of returning the ones that are removed, it returns the ones that are not removed.
Is there a method that does that?
Try this: