d 是一个类似Map的对象,我需要根据他的每一个key 去获取对应的value保存到data数组里面,并且不改变原来key的顺序。
var d = {"100003":{"isClosed":0,"time":1,"wordId":10003},"100000":{"isClosed":1,"time":1,"wordId":100000},"100005":{"isClosed":0,"time":1,"wordId":100005},"100004":{"isClosed":1,"time":1,"wordId":100004},"100007":{"isClosed":0,"time":1,"wordId":100007},"100008":{"isClosed":0,"time":1,"wordId":100008},"100002":{"isClosed":0,"time":1,"wordId":100002}} ;
var data = [];
data 里面是 这样的解构 data = [
{ 100003: { "isClosed":0, "time":1, "wordId":10003 } }, { 100000: { "isClosed":0, "time":1, "wordId":10000 } }
]
叮当猫咪
相关分类