Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your question is kind of vague - is this what you need?</p> <pre><code>var len = categoriesArr.length; for(var i = 0 ; i &lt; len ; i++){ //do something with categoriesArr[i].Categories (could write to DOM) console.log(categoriesArr[i].Categories); for(var x in categoriesArr[i].desc[0]){ //do something with categoriesArr[i].desc[0][x] (could write to DOM) console.log(x + ": " + categoriesArr[i].desc[0][x]); } } </code></pre> <p>I log the results to the web console, but please feel free to do whatever you wish.</p> <p>To paginate you should look at <a href="http://filamentgroup.com/lab/jquery_mobile_pagination_plugin/" rel="nofollow">FilamentGroup's Mobile Pagination Plugin</a></p> <p><strong>Edit After Your Comment</strong></p> <p>Do you mean the desc arrays contain more than one element, a la:</p> <pre><code>var categoriesArr = [ { "Categories": "Bengali Products", "desc": [{"code":"40740","product":"Alphonso Mango Jam 300 Gms","rate":"54.00"}, {"code":"1337","product":"jordanarseno","rate":"Free"}] }, { "Categories": "Beverages (Town)", "desc": [{"code":"40011","product":"Badam Powder 100grams","rate":"30.00"}] } ]; </code></pre> <p>If so, iterate over the desc array instead of assuming zero index:</p> <pre><code>for(var i = 0, len = categoriesArr.length ; i &lt; len ; i++){ //do something with categoriesArr[i].Categories (could write to DOM) console.log(categoriesArr[i].Categories); for(var j = 0, dlen = categoriesArr[i].desc.length ; j &lt; dlen ; j++){ for(var x in categoriesArr[i].desc[j]){ //do something with categoriesArr[i].desc[j][x] (could write to DOM) console.log(x + ": " + categoriesArr[i].desc[j][x]); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload