With this Hash:
{ "blog_namespace" : { "key" : "blog_post_1234",
"notice" : "Read the new blog post!" } }
What’s the quickest way to translate it into the Hash:
{ "blog_post_1234" : "Read the new blog post!" }
?
I always see people using clever combinations of map and merge etc, but can’t quite get my head around a way to do this without nesting two loops together.
These hashes appear to be JSON objects. If they are, use a JSON parser to transform them into ruby hashes.