I have two list of arrays with country code and currencies in order, but I need to know how to combine and form a object in the following format.
var cn =["AL","DZ","AS","AD","AO","AI","AG","AR","AM","AW","AU"];
var ccy = ["ALL","DZD","USD","EUR","AOA","XCD","XCD","ARS","AMD","AWG","AUD"];
Expected Output:
country:[
{
"code": "AL",
"currency": ["ALL"]
},
{
"code": "DZ",
"currency": ["DZD"]
}...
...
{
"code": "AU",
"currency": ["AUD"]
}
]
code
andcurrency
? Do they just match 1 on 1? – zynkn Aug 22 '19 at 1:27Array
methods. What have you tried so far? – user4642212 Aug 22 '19 at 1:29