最佳答案
我想像这样转换一个对象:
{"1":5,"2":7,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0}
输入一个键值对数组,如下所示:
[[1,5],[2,7],[3,0],[4,0]...].
如何将对象转换为JavaScript中的键值对数组?