I would like to know how to Change the value in nested array from array in javascript.
I have a obj and arr in which i need to replace month value with arr value in javascript,
i.e for "12" should be "Dec"
var arr = ["Jan", "Feb","Mar", "Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]
var obj =[{
"month": "12",
"year": "2013"
},
{
"month": "10",
"year": "2012"
}]
Expected Output:
[{
"month": "Dec",
"year": "2013"
},
{
"month": "Oct",
"year": "2012"
}]