Populating Json array with multiple jobects

I’m using a for each loop to loop through arrays and store the values in jobects within a jarray but after each iteration the previous iteration values get overridden, is there any way to keep the existing values and just add the new iteration under the current one so it look like the below.

“CompaniesInfo”: [
{
“CompanyId”: 138,
“CompanyInfo”: {
“Score”: “123”,
“DocumentKey”: “76149”,
“DocumentUrl”: “Test .pdf”,
“IsSuccess”: “”,
“Comment”: “”
}
},
{
“CompanyId”: 139,
“CompanyInfo”: {
“Score”: “456”,
“DocumentKey”: “76149c7b”,
“DocumentUrl”: “Test df”,
“IsSuccess”: “”,
“Comment”: “”
}
}
]

the current output I’m getting

“InsuredCompaniesInfo”: {
“CompaniesInfo”: {
“InsuredCompanyId”: 139,
“CompanyInfo”: {
“Score”: “39”,
“DocumentKey”: “139-12-1-14141”,
“DocumentUrl”: “S3bucket.url”,
“IsSuccess”: “True”
}
}
},

Cross Reference:

Hi @ppr do you have any advice on this?