am new to JavaScript and really struggling to nest some values of key-value pairs in a given object, like Basis (see below) by taking a key (for example "a") and adding a nested key (for example "e") as below and allocate the related value from basis to the added nested key. For each, a new object should be added in the same hierarchy to wrap it in an array.

Example

```
// Basis could look like this
{ a: '1', b: '2', c: '3', d: '4' }

// Map through basis and add new nested keys 
{ a: 'e', b: 'f', c: 'g', d: 'h', e: 'i', f: 'j', g: 'k' }

// Objective    
{ a: [{e: '1', date: Date.now()}], b: [{f: '2', date: Date.now()}], c: [{g: '3', date: Date.now()}], d: [{h: '4', date: Date.now()}] }

```

It is hard. I have no idea. Even the following source did not help me as I have to loop through a given object with key-value pairs.
[Javascript: how to dynamically create nested objects using object names given by an array](https://stackoverflow.com/questions/5484673/javascript-how-to-dynamically-create-nested-objects-using-object-names-given-by)