title: Parsing Hashie::Mash output to Json in ruby
body: <p>I'm getting user input in JSON format for an API created using grape. In a particular parameter, I'm giving an array of JSON in the following format.</p>
  
  <pre><code> "personal" : {
    "details" : {
     "firstname" :"nagalakshmi",
     "lastname" : "n"
    }
  }
  </code></pre>
  
  <p>When I tried to print "personal" attribute it is showing like below</p>
  
  <pre><code>#&lt;Hashie::Mash details=#&lt;Hashie::Mash firstname="nagalakshmi" lastname="n"&gt;&gt;
  </code></pre>
  
  <p>Is there any way to parse the attribute to  json format?</p>