var body = request.body;
for (var i = 0; i < body.data.length; i++) {
var obj = body.data[i];
var keys = Object.keys(obj);
for (var i = 0; i < keys.length; i++) {
var value = Object.values(obj[keys[i]]);
console.log(value);
}
}
在这里,我会像这样[{key: 'key'}, {key1: 'key1'}]
以及如何将[{key: 'key'}, {key1: 'key1'}]
转换为{key: 'key'}, {key1: 'key1'}
我正在尝试Object.values(obj[keys[i]]).join();
,但响应(Object, Object), (Object, Object)