I have an object, from which an array has to be made, where key + value pairs are converted to strings.
var obj = {'x': 1, 'y': 2, 'z':3};
I have tried to convert the content to strings:
var joined = Object.entries(obj ).join(' ');
"x,1 y,2 z,3"
and to an array of arrays
var entries = Object.entries(obj);
But it is not exactly what I need
My ideal result is
var arrayFromObject = ['x 1', 'y 2', 'z 3'];
I can probably flatten the array of arrays but maybe there is a better solution?