题目描述arr1=[1,2,3,4,5];arr2=[a1,a2,a3,a4,a5];arr3=[b1,b2,b3,b4,b5];arr4=[c1,c2,c3,c4,c5];arr5=[11,22,33,44,55];多个数组类似这个形式,数组里内容是不定的需要合并成这个形式[{"a":"1","b":"a1","c":"b1","d":"c1","e":"11"},{"a":"2","b":"a2","c":"b2","d":"c2","e":"22"},{"a":"3","b":"a3","c":"b3","d":"c3","e":"33"},{"a":"4","b":"a4","c":"b4","d":"c4","e":"44"},{"a":"5","b":"a5","c":"b5","d":"c5","e":"55"}]两个数组我用的2个for循环嵌套和if语句判断push到对象里如果更多(5-6个数组)有什么更好的办法。
weixin_慕仰3408494
梦里花落0921
汪汪一只猫
相关分类