Home > front end >  On an array of 1, an array of 2, 3 arrays, and merged with json.
On an array of 1, an array of 2, 3 arrays, and merged with json.

Time:10-02

Array 1: [" aname ", "bname", "cname", "dname", "fname"]
Array 2: [" a2 ", "b2", "c2", "d2", "f2]
An array of 3: [" a3 ", "3", "c3", "d3", "f3"]


Js merged with a general of the json format,
In tiny WeChat program, for example, with wx. Can use for a variable can through the data again, seemingly wx. For maximum 2 array variable,

Therefore, consult, thank you.

CodePudding user response:

You're an array directly combined well
 var arr1=[" aname ", "bname", "cname", "dname", "fname"] 
Var arr2=[" a2 ", "b2", "c2", "d2", "f2]
Var arr3=[" a3 ", "3", "c3", "d3", "f3"]
Var res=[];
Res. Push (... Arr1)
Res. Push (... Arr2)
Res. Push (... Arr3)
The console. The log (res)
  • Related