title: how to access array in jquery
body: <p>The array is somewhat like this :</p>
  
  <pre><code>[[Object { button={...}}, 
    Object { input={...}}, 
    Object { checkbox={...}}, 
    Object { textarea={...}}],
   [Object { textarea={...}}]
  ]
  </code></pre>
  
  <p>In the curly brackets i have set some properties like color,value,type etc.<br>
  What i want is to get the each object of  an array and check through the properties like type of an object and then call a function to perform further things. Just like in PHP we use :</p>
  
  <pre><code>foreach($a as $b){
   // and then do something here ..
  }; 
  </code></pre>
  
  <p>Kindly help me through and i hope everyone can understand what i am trying to say.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// var i is the counter for page numbers   
  function pagination(i) {
    alert(i);
    i--;
    //page is array 
  
    var result = page;
    //console.log(result[i]);
    var $currentElem;
    $(result[i]).each(function() {
  
      currentElem = $(this);
      console.log(currentElem);
  
    });
  }</code></pre>
  </div>
  </div>
  </p>