I have two Arrays of data with same length and indexes are related.
var a = [ "Paris", "London", "Boston"];
var b = [ 70,60,50];
I want to obtain the following object:
[{
"city":"Paris",
"temperature":70
},{
"city":"London",
"temperature":60
},{
"city":"Boston",
"temperature":50
}]
How can I achieve this using javascript?