convert a structured string into array
<p>this question might have been asked already. But i really have no idea what to search for.</p>

<p>If I have a string like </p>

<pre><code>{{aa:bb,aaa:bbb,cc:ee{{aa:cd,cdc:dd,{{ss:ee}},kk:ee}},se:ff}}
</code></pre>

<p>I need to get output in probably in array</p>

<p>ar[0] = aa:bb, ar[1]=aaa:bbb, ar[3] = {{...}}</p>

<p>I tried using <code>variable.split("}}")</code></p>

<p>which is breaking the string and not getting the actual data. </p>

<p>Is there any recursive function to do this? 
I am not able to search because I have no clear idea of what objects,strings. </p>
