Binding Ajax response to jquery nested array -


i'm trying bind ajax response jquery nested array (arrays inside main array). example explanation of requirement

ajax response : {1,2,3,4,5,6,7,8,9} 

i want convert jquery arrays mentioned below.

[[1,2,3],[4,5,6],[7.8.9]] 

please let me know possible way.

for example case, work :

var ajaxresponse = [1, 2, 3, 4, 5, 6, 7, 8, 9]; var resultarrays = []; (var = 0; < ajaxresponse.length; = + 3) {     var tmparray = [];     (var j = 0; j < 3; j++) {         tmparray.push(ajaxresponse[i+j]);     }     resultarrays.push(tmparray); } 

Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -