for example:
let array2 = [[{"Aaa":111}],[{"bbb":222}],[{"ccc":333}]];
I am a beginner, How can I turn it into?
[{"Aaa":111},{"bbb":222},{"ccc":333}]
You can try mapping it like this:
array2 = array2.map(i=>{
return i[0]
})
You can make use of the javascript map
function like this:
array2.map(x => x[0]);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.