Ruby | Hash flatten() function
Hash#flatten() is a Hash class method which returns the one-dimensional flattening hash array. Syntax: Hash.flatten() Parameter: Hash values Return: one-dimensional flattening hash array Example #1 : # Ruby code for Hash.flatten() method # declaring Hash value a = {a:100, b:200} # declaring Hash val