title: NodeJs retrieving value from Array show as un
body: <p><code>cellsData</code> have array like below in global variable</p>
  
  <pre><code> [   { id: 2,
      cellId: 'R2C3',
      row: '2',
      col: '3',
      value: '202',
      rawValue: '202.0',
      numValue: '$202' },
    { id: 3,
      cellId: 'R2C4',
      row: '2',
      col: '4',
      value: '2034',
      rawValue: '2034.0',
      numValue: '$2,034' }]
  </code></pre>
  
  <p>I have a soda script in which I want to verify the data after reading from this array
  problem is it gives error on <code>cellsData[startRowId].numValue</code> as, 27 undefined</p>
  
  <p>I tried <code>global.cellsData</code> also but no working</p>
  
  <p>error</p>
  
  <p>.keyYears table tbody tr:nth-child('+i+') td:nth-child(3)',''+ cellsData[startRowI
                                                                      ^</p>
  
  <blockquote>
    <p>TypeError: Cannot read property '27' of undefined</p>
  </blockquote>
  
  <pre><code>    var browser = soda.createClient({
      .....
      });
  
  // Retrieving data from Excel sheet    
  testsheet.setAuth( 'user', 'pass', function(err){
  
  if (err) console.log(err);
  
  testsheet.getCells( 1, function(err, cellsObj){
  
      if (err) console.log(err);   
  
      cellsData = cellsObj.cells;
      rowcount = cellsObj.RowCount;
  });
  
  })
  
  
  browser 
      .chain
      .session()  
      .setSpeed(speed)
      .setTimeout(2000)
      .open('/')
      .and(login('dev@dev.com', 'x1212GQsdtpS'))
      .and(verifyData())
      .end(function(err){
          console.log('error');
  
      });
  
  function login(user, pass) {
    return function(browser) {
      browser
      .click('css=a#loginButton')
      .type('css=input.input-medium.email',user)
      .type('css=input.input.pwd',pass)
      .clickAndWait('css=a.btn.login')
      .assertTextPresent('Clients',function(){ console.log('logged in ok')})
    }
  }
  
  
  function verifyData() {
              var startRowId=27
      console.log('inside TestingSpreaddsheet')
      var totalLoop=(rowcount-5)+1
    return function(browser) {
      browser
      for (var i = 1; i &lt;= 4; i++) {
      browser.assertText('css=div.keyYears table tbody tr:nth-child('+i+') td:nth-child(3)',''+ cellsData[startRowId].numValue +'',function(){ console.log('looks good')})
      .assertText('css=div.keyYears table tbody tr:nth-child('+i+') td:nth-child(5)',''+ cellsData[startRowId].numValue +'')
      .assertText('css=div.keyYears table tbody tr:nth-child('+i+') td:nth-child(6)',''+ cellsData[startRowId].numValue +'')
      .assertText('css=div.keyYears table tbody tr:nth-child('+i+') td:nth-child(7)',''+ cellsData[startRowId].numValue +'')
  
      }
    }
  }
  </code></pre>
  
  <p><strong>UPDATE</strong>
  Soda is running the chain before fetching my ExcelSheet Data. How to control chain ?</p>