I have the following data structure: 

```
const data = [
  {
    name: 'ABC',
    salesData: [
      {
        timestamp: '2017-09-01',
        value: 10
      },
      {
        timestamp: '2017-09-02',
        value: 2
      }
    ]
  },
  {
    name: 'DEF',
    salesData: [
      {
        timestamp: '2017-09-01',
        value: 8
      },
      {
        timestamp: '2017-09-02',
        value: 3
      }
    ]
  }
];

```

I would like to transform this to:

```
[
  {
    name: 'ABC',
    '2017-09-01': 10,
    '2017-09-02': 2
  },
  {
    name: 'CDE',
    '2017-09-01': 8,
    '2017-09-02': 3
  }
]

```

I'm trying to use Underscore's Chain and Map which I'm getting confused. So far I have the following, not sure how do I write the `convertedSalesData` to transform as per the need:

```
_.map(data, function(item) {
    let name = item.name;
    let salesData = item.salesData;
    let convertedSalesData = ?
})

```