标签: javascript arrays json object
我的问题是如何通过id创建其他数组来正确添加对象数组的值,例如,我有:
var array = [{"key":"1","amount":200},{"key":"2","amount":200},{"key":"1","amount":200}]; var resultArray=[{"key":"1","amount":400},{"key":"2","amount":200}]