a quick demo on how to take an array and create a nested object with it dynamically using elements as keys