Skip to content

Instantly share code, notes, and snippets.

@cjjuice
Last active December 8, 2017 21:03
Show Gist options
  • Save cjjuice/0ea35b87d7eddcd9c7c398c6c914fd53 to your computer and use it in GitHub Desktop.
Save cjjuice/0ea35b87d7eddcd9c7c398c6c914fd53 to your computer and use it in GitHub Desktop.
# write a method that takes the array of hashes as an argument and
# if any of the values of the element hashes are nil,
# remove the hash from the parent array.
# i.e input: [{a: 4, b: nil}, {a: 5, b: 6}, {a: nil, b: 2}]
# output: [{a:5, b: 6}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment