title: How do I convert a Ruby string with brackets to an array?
body: <p>I would like to convert the following string into an array/nested array: </p>
  
  <pre><code>str = "[[this, is],[a, nested],[array]]"
  
  newarray = # this is what I need help with!
  
  newarray.inspect  # =&gt; [['this','is'],['a','nested'],['array']]
  </code></pre>