Return an array of key/value pairs, also represented as arrays. Pass in the object as an argument.
var lunch = {
sandwich: 'turkey',
chips: 'cape cod',
drink: 'soda'
};
// logs [['sandwich', 'turkey'], ['chips', 'cape code'], ['drink', 'soda']]
var entries = Object.entries(lunch);
console.log(entries);
Source
https://vanillajstoolkit.com/reference/objects/object-entries/