I am very new to development and have started working with arrays and objects. I want to modify the below structure.
[{
"build": "Build 1",
"date": "2019-08-16",
"details": [{
"type": "algo",
"count": 1
}, {
"type": "Code",
"count": 35
}]
}, {
"build": "Build 2",
"date": "2019-08-08",
"details": [{
"type": "algo",
"count": 2
}, {
"type": "Code",
"count": 70
}]
}]
This is the final structure that I want:
[{
"build": "Build 1",
"date": "2019-08-16",
"type": "algo",
"count": 1
}, {
"build": "Build 1",
"date": "2019-08-16",
"type": "code",
"count": 35
}, {
"build": "Build 2",
"date": "2019-08-08",
"type": "algo",
"count": 2
}, {
"build": "Build 2",
"date": "2019-08-08",
"type": "code",
"count": 70
}]
Is there any way to do this in Javascript or jQuery? Any help will be appreciated. Thanks in advance.