Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
233 views
in Technique[技术] by (71.8m points)

如何获取到data的长度

图片描述

data.length是报错,我在想怎么获取到他们的长度,上面是我用JSON.stringify(data)输出的后台数据

?{"0":{"id":3,"name":"测试2","front_cover":"6"},
"1":{"id":2,"name":"测1","front_cover":"7"},
"2":{"id":1,"name":"阿11","front_cover":"6"},
"success":true}


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

你的第三条数据,6后面两个引号是什么?

格式都不对,自然是有问题的


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...