Array List in XPages how to parse
<p>I have some values in array like this below (arr1);
I need to make a kind of unique arrayList which has to collect and make a new list with values before <strong>"~"</strong> 
If the value before the "~" is in the new list, the value after "~" has to append into existing value of array.</p>

<pre><code>var arr1:Array = new Array();
arr1[0] = "test 1 ~ 781.102";
arr1[1] = "test 2 ~ 981.112";
arr1[2] = "test 2 ~ 191.222";
arr1[3] = "~ 431.332";
arr1[4] = "test 1 ~ 121.332";
arr1[5] = "test 3 ~ 121.442";
arr1[6] = "test 3 ~ 201.552";
</code></pre>

<p>New List should be this...</p>

<pre><code> var nArr:Array = new Array();
    nArr[0]= "test 1 - (781.102,121.332)";
    nArr[1]= "test 2 - (981.112,191.222)";
    nArr[2]= "test 3 - (121.442,201.552)";
    nArr[3]= "undefined - (431.332)";
</code></pre>