Check out example codes for "ruby are spaces in keys of hashes allowed". It will help you in understanding the concepts better.

Code Example 1

# Any Object can be used as a key
# so this is allowed:
hash = {
	"k e y   w i t h  S P A C E S" => "is valid"
puts hash.inspect
#> {"k e y   w i t h  S P A C E S"=>"is valid"}

Learn ReactJs, React Native from