Need to do some data transformation for this object:

```js
let states = [{
    "status": "up",
    "timefrom": 1551271539,
    "timeto": 1551284429
  },
  {
    "status": "down",
    "timefrom": 1551284429,
    "timeto": 1551284489
  },
  {
    "status": "up",
    "timefrom": 1551284489,
    "timeto": 1551294149
  },
  {
    "status": "down",
    "timefrom": 1551294149,
    "timeto": 1551294269
  },
  {
    "status": "up",
    "timefrom": 1551294269,
    "timeto": 1551876329
  }
]

let newStates = states.map(state => {
  let obj = {};
  obj[state.status] = [state.timefrom, state.timeto];
  return obj;
})

console.log(newStates);
```

My goal is to return an array of objects where the object is something like {up: [1551271539, 1551284429]}