title: Nightwatch js assert element values sorted
body: <p>Trying to test a filter feature on a table that I built and not sure how to do it with nightwatch. </p>
  
  <p>I can run through and view all the element values, but not sure how to compare them to see if they are less than or equal to the next</p>
  
  <pre><code>Then(/^I should expect to see the returned results ordered from least to greatest$/, () =&gt; {
      return client
              .elements('css selector', 'td[class=someColumn]', (results) =&gt; {
                  for(let i = 0; i &lt; results.value.length; i++){
                      client.elementIdText(results.value[i].ELEMENT, (result) =&gt; {
                          console.log(result.value);
                          return result.value;
                      })
                  }
              });
  });
  </code></pre>
  
  <p>Any pointers are greatly appreciated </p>