const x = [{a: 1,b:2}, {a:3,b:4}, {a: 5,b:6}];
console.log(x.map(Object.values));
Conclusion:
[
[1,2],
[3,4],
[5,6]
]
Also, if you really need a line (incomprehensible from your question)
x
.map(o => Object.values(o).join(','))
.join('\n')
source
share