有人知道转这个的好方法吗?:
var obj = [{key1: value1,key2: value2},{key3: value3,key4: value4}];
成:
var obj = [{Key1: value1,Key2: value2},{Key3: value3,Key4: value4}];
最佳答案
循环删除并替换:
var obj = [{key1: 1,key2: 1},{key3: 1,key4: 1}];
for(var i = 0; i