我想在 AngularJS 中动态添加 JSON 元素的值。下面是我要在其中显示它的 HTML 标记:
<tr>
<th class="right"> Ending Value<span class="subVal">:</span></th>
</tr>
<tr>
<td class="right">$21,50,868.06</td>
</tr>
现在对于这个结束值,我希望它应该是retailAcctTotalBalance
以下 json 元素的总和:
"acconnts": [{
"userName": null,
"retailAcctNumber": "574436368",
"retailAcctTotalBalance": 0.0
}, {
"userName": null,
"retailAcctNumber": "101215858",
"retailAcctTotalBalance": 2118639.38
}, {
"userName": null,
"retailAcctNumber": "101900352",
"retailAcctTotalBalance": 32228.68
}, {
"userName": null,
"retailAcctNumber": "574435165",
"retailAcctTotalBalance": 0.0
}]