I have an object like this coming back as a JSON response from the server:
(我有一个像这样的对象作为来自服务器的JSON响应返回:)
{"0":"1","1":"2","2":"3","3":"4"}
I want to convert it into a JavaScript array like this:
(我想将它转换为像这样的JavaScript数组:)
["1","2","3","4"]
Is there a best way to do this?
(有没有最好的方法来做到这一点?)
Wherever I am reading, people are using complex logic using loops.(无论我在哪里阅读,人们都在使用循环来使用复杂的逻辑。)
So are there alternative methods to doing this?(那么有没有其他方法来做到这一点?)
ask by Nikhil Agrawal translate from so