我有数组
[{
"studentname": "abc",
"marks": "20"
},
{
"studentname": "abc2",
"marks": "20"
}
]
我想在studentname=abc的地方再加10个分数,怎么做呢
例如10 +20=30,因此输出将为
[{
"studentname": "abc",
"marks": "30"
},
{
"studentname": "abc2",
"marks": "20"
}
]
4条答案
按热度按时间s4n0splo1#
kuhbmx9i2#
这是一个干净的方法。
tag5nh1u3#
lo8azlld4#