Looking to nest each element of an array into a new object within another object
let newArr = ['Parent', 'Child']
Desiring the array to be transformed into this structure
Parent[Child]={}
Seeking a way to iterate through the array and convert it based on its length