Как я могу поместить все месяцы в атрибут Month?
input = [
{
"Year": "2019",
"Month": "06",
"Days_Past_Due": "450",
"Asset_Classification": "?"
},
{
"Year": "2019",
"Month": "05",
"Days_Past_Due": "50",
"Asset_Classification": "?"
},
"Year": "2019",
"Month": "12",
"Days_Past_Due": "10",
"Asset_Classification": "?"
}
]
output = [{ "year": "2019",
"description": "Days Past Due",
"dec": "10",
"nov": "0",
"oct": "0",
"sep": "0",
"aug": "0",
"jul": "0",
"jun": "450",
"may": "50",
"apr": "0",
"mar": "0",
"feb": "0",
"jan": "0"}]
Создайте пустой объект и выполните итерацию по входу