This would work instead:

```javascript
project = Object.prototype.toString.call(ret.project) === '[object Array]' ? ret.project[0] : ret.project
```