title: Convert a groovy string to a map in groovy
body: <p>I need to convert a groovy string to a map object. The string exactly is :</p>
  
  <pre><code>"\"{\\\"1\\\":[],\\\"2\\\":[],\\\"3\\\":[{\\\"name\\\":\\\"PVR_Test_Product\\\",\\\"id\\\":\\\"100048\\\"}],\\\"4\\\":[],\\\"5\\\":[]}\""
  </code></pre>
  
  <p>I need to fetch the value corresponding to "name". I have tried using the JsonBuilder, JsonSlurper and regexp approach for this problem. But I have not yet come to a solution.</p>
  
  <p>For Simplifying things I have removed the backslashes with : <code>replaceAll</code>.The reduced string is :</p>
  
  <pre><code>""{"1":[],"2":[],"3":[{"name":"PVR_Test_Product","id":"100048"}],"4":[],"5":[]}""
  </code></pre>
  
  <p>Looking forward to any help on this.I am using grails 2.5.1 and groovy 2.4.10.</p>