Could someone please help me with converting this array?
const myArr = ['lorem', 'ipsum', 'dolor', 'sit', 'amet']
I want to transform it into an object structure like this:
{
lorem:{
ipsum:{
dolor:{
sit:{
amet: ''
}
}
}
}
}
Is there a simple method to achieve this transformation?