I have this array: ["description", "asc"]
and want to turn it into this object:
{ "description": "asc" }
What's the fastest way to achieve this?
I tried
const obj = { array[0] : array[1] }
But it doesn't work because I can't seem to set the key of the object dynamically?