Yet another solution if Object.entries
won't work for you.
const obj = {
'1': 29,
'2': 42
};
const arr = Array.from(Object.keys(obj), k=>[`${k}`, obj[k]]);
console.log(arr);
Yet another solution if Object.entries
won't work for you.
const obj = {
'1': 29,
'2': 42
};
const arr = Array.from(Object.keys(obj), k=>[`${k}`, obj[k]]);
console.log(arr);
For further actions, you may consider blocking this person and/or reporting abuse
amal V Felix -
Alex Ricciardi -
Eduardo Silva -
AuthAction Developer -
Top comments (0)