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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -