title: VBscript searching value in 2d array
body: <p>I have 2d array parced from XML.
  An example of XML:</p>
  
  <pre><code>  &lt;string-array name="array1"&gt;
      &lt;field name="City" type="string"&gt;Moscow&lt;/field&gt;
      &lt;field name="Id" type="number"&gt;10&lt;/field&gt; (p.s. ID is unique within array)
      &lt;field name="Version" type="number"&gt;2&lt;/field&gt;
      .......
    &lt;/string-array&gt;
  </code></pre>
  
  <p>Parcing it:</p>
  
  <pre><code>For i=0 to NodeK.length-1
      array1(0,i)=NodeK(i).getAttribute("name")
      array1(1,i)=NodeK(i).text
  Next
  </code></pre>
  
  <p>So 2d array looks like:</p>
  
  <pre><code>array1(0,0)="City"
  array1(1,0)="Moscow"
  array1(0,1)="ID"
  array1(1,1)=10
  array1(0,2)="Version"
  array1(1,2)=2
  </code></pre>
  
  <p>The task is to pick up value for ID so that to use it (in SysId variable) further. The following code does not work properly</p>
  
  <pre><code>For i=LBound(array1,1) to Ubound (array1,1)
      For j=Lbound(array1,2) to Ubound(array1,2)
          if j=0 then
              if  array(i,0)="ID"   Then
                  SysID=array(i,1)
                  MsgBox "New ID is: " &amp; ID, 64
              end if
          End If
      Next
  Next
  </code></pre>
  
  <p>Once value (ID=10 in our case) is found loop should exit.
  Thank you in advance!</p>