In react you can do something like
const obj = {
thing: 'a',
}
then const { thing } = obj is a shorthand for const thing = obj.thing
is there a way to convert all object key/value pairs at once?
Object.keys(obj).map((key) => {
const eval(key) = obj[key];
}
something like that.
Thanks in advance!