Object, synthesize a new array?

var obj = {

"1": [111, 222],
"2": [333],
"3": [444, 555]

};
var arr = [];
for (var i in obj) {

arr.push(...obj[i]);

}
console.log (arr);
or
var obj = {

"1": [111, 222],
"2": [333],
"3": [444, 555]

};
var arr = [];
for (var i in obj) {

for(var j in obj[i]){
    arr.push(obj[i][j]);
}    

}
console.log (arr);
or
var arr = [];
for (var i in obj) {

arr=arr.concat(obj[i]);

}
console.log (arr);
it would be easy to make reasonable use of the ES2015 feature.

var obj = {

"1": [111, 222],
"2": [333],
"3": [444, 555]

};
let arr = Object.values (obj). Reduce ((afort b) = > a.concat (b)); / / [111222333444555]

Dec.28,2021

actually, is not a problem. You can write it in your own notes , think about , and take notes

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b397dc-2b915.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b397dc-2b915.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?