In lodash we have the \_mapKeys method that I'm using like this:

Here is an array of objects:

```
const posts = [
  {
    id: 123,
    title: 'Hello',
  },
  {
    id: 321,
    title: 'World',
  },
];

```

From there I use the method like so:

```
const postsObjWithKeys = _.mapKeys(posts, 'id');

console.log(postsObjWithKeys);

```

And the result is: 

```
{
  123: {id: 123, title: 'Hello'},
  321: {id: 321, title: 'World'}
}

```

Perfect! Exactly what I want!

**The question is how would I achieve this in 'reverse'? Meaning if I had an object like this:**

```
const posts = {
  123: {
    title: 'Hello' 
  },
  321: {
    title: 'World'
  }
}

```

Is it possible to take the key and assign it as a value if id? The end result being:

```
const posts = {
  123: {
    id: 123,
    title: 'Hello' 
  },
  321: {
    id: 321,
    title: 'World'
  }
}

```