Answers for "make a flat object from object of object list"

0

make a flat object from object of object list

var object =  { 0: [1, 2, 3, 4] },
    result = Object.keys(object).reduce(function (r, k) {
        return r.concat(k, object[k]);
    }, []);
    
console.log(result);
Posted by: Guest on September-23-2020

Code answers related to "make a flat object from object of object list"

Code answers related to "Javascript"

Browse Popular Code Answers by Language