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
SIVAGAYATHRI P IT -
seo2 -
Sibitha shri -
Adil -
Top comments (0)