how to split a query with 'AND' and/or 'OR' arguments in it in jquery?
<p>how to split a query with 'AND' and/or 'OR' arguments in it in jquery?
Suppose iam having  </p>

<pre><code>A=( 1=1,FirstName='aaa' or FirstName='bbb' and FirstName='ccc' or FirstName='ddd' and FirstName='eee')
</code></pre>

<p>Now i want to split 'A' with 'and' &amp; 'or' and get the result as below</p>

<pre><code>A=(FirstName='aaa' , FirstName='dddd' , FirstName='bbb' , FirstName='dddd' , FirstName='cccc')
</code></pre>

<p>but the thing is i may or may not have 'or' in the query, still it should produce a o/p with all the values after split. Please help.
Different types of queries could be as below:</p>

<pre><code>A=( 1=1,FirstName='aaa' or FirstName='bbb' and FirstName='ccc' or FirstName='eee' and FirstName='fff')  
A=( 1=1,FirstName='aaa' and FirstName='bbb' and FirstName='ccc' and FirstName='ddd' and FirstName='fff')
A=( 1=1,FirstName='aaa' or FirstName='bbb' or FirstName='ccc' or FirstName='ddd' or FirstName='fff')
</code></pre>

<p>Query is not static i just gave an example, it could be any string.</p>
