Since you're in node land, you can use some of the new JS features we can't rely on in the browser.  Here, it would be cleaner to use the `Array.prototype.map` method, which would work like so:

```javascript
var projects;
if (results ) {
  projects = results.map(function(result) {
    var url = result.url;
    return {
       title: url,
       edit: url + "/edit",
       view: url
    };     
  });
} else {
  projects = [];
}
```