I have an array object here:
var obj = { name: 'Chris', age: 25, hobby: 'programming' }; I need a function that will convert an object literal into an array of arrays even without knowing the key or the value like this:
[['name', 'Chris'], ['age', 25], ['hobby', 'programming']] So I created a function to do that. However I am not sure where to start to enable me to merge them.
function convert(obj) { var array = []; } convert(obj); Any help?
Object.prototype.keys()+Array.prototype.map()