这是我的 JSON 文档中的示例 JSON 对象:
[{
"_id": "COVERAGE_0025",
"coverageName": "windStormHailDeductible",
"coverageResponse": "15000",
"insuranceLine": "COMMERCIAL",
"coverageCategory": "DEDUCTIBLE",
"splitCoverages": null,
"carriers": [{
"carrierId": "CNINCO",
"states": null,
"excludedStates": [
"FL"
],
"industries": null,
"excludedIndustries": null,
"products": [
"BOP",
"WC"
]
}]
我需要将除了coverageName和_id之外的所有内容分组coverages。
这是我想要的输出:
[{
"_id": "COVERAGE_0025",
"coverageName": "windStormHailDeductible",
"coverages": [{
"coverageResponse": "15000",
"insuranceLine": "COMMERCIAL",
"coverageCategory": "DEDUCTIBLE",
"splitCoverages": null,
"carriers": [{
"carrierId": "CNINCO",
"states": null,
"excludedStates": [
"FL"
],
"industries": null,
"excludedIndustries": null,
"products": [
"BOP",
"WC"
]
}]
}]
}]
偶然的你
相关分类