JSFiddle - React, Tailwind, and code Playground
JavaScript
function toPairs(input) {
if(typeof input !== 'object')
return false;
let result = [];
for(let key in input) {
result.push([key, input]);
}
return result;
}
console.log(toPairs({a:1, b:2, c:3}));