Answers for "turn object's properties into array of objects js"

0

turn object's properties into array of objects js

let data = {
  '1536135941922': 'true',
  '1536135962942': 'false',
  '1536135986966': 'false',
  '1536135989968': 'true'
};
  
let result = Object.entries(data).map(( [k, v] ) => ({ [k]: v }));

console.log(result);
Posted by: Guest on May-07-2021

Code answers related to "turn object's properties into array of objects js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language