Welcome to Qi-U Community for programmer and developer-Open, Learning and Share

Categories

0 votes
535 views
in Technique[技术] by (31.9m points)

JS对象数组怎么去除数字索引啊

image.png


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

Please log in or register to answer this question.

1 Answer

0 votes
by (31.9m points)

我通过array.push()往数组里加数据,最后得到的是上面格式的数据,但是我提交给后台需要去除数字索引
[{name:'我',number:'1'},{name:'的',number:'2'}]
上面就是我想要的格式


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Qi-U Community for programmer and developer-Open, Learning and Share

755k questions

547k answers

4 comments

86.4k users

...