menu
more_vert
js如何删除json里的值

作者:dayu

1
2
3
4
5
6
<script>
vars=[{"name":"tank","total":"100"},{"name":"zhang","total":"23"},{"name":"hao","total":"325"}];
for(vark=0;k<s.length;k++){
deletes[k]["name"];
}
</script>



本回答由电脑网络分类达人 王大伟推荐
评论(2) 611




技术分享


woshidaniel

采纳率:72%擅长:暂未定制





其他回答


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPEHTML>
<html>
<head>
<title>yugi</title>
<metacharset=UTF-8/>
<styletype="text/css">
</style>
<scripttype="text/javascript">
vars=[
{
"name":"tank",
"total":"100"
},
{
"name":"zhang",
"total":"23"
},
{
"name":"hao",
"total":"325"
}
];

for(vari=0;i<s.length;i++)
{
deletes[i].name;
}

console.log(s);
</script>
</head>
<body>
</body>
</html>







js如何删除json里的值

原文地址:http://www.cnblogs.com/ConfidentLiu/p/7204998.html



Processed Time:0.2289879322052

_REQUEST:
Array
(
    [0] => read
    [1] => 95577
)
_SESSION:
Array
(
    [fid] => 4
)