Browse files

added json array looping

  • Loading branch information...
1 parent 7867056 commit 7f51b3abcaf54e28429542706c6a617ce7557905 @chrismatthieu committed Aug 9, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 server.js
View
10 server.js
@@ -88,7 +88,15 @@ app.get('/', function(req, res){
console.log(results);
console.log(fields);
- res.send(JSON.stringify(results));
+
+ // res.send(JSON.stringify(results));
+
+ var i, recdata, titlestring="";
+ for (i = 0; i < results.length; i++){
+ titlestring += results[i].title + ', '
+ }
+ res.send(titlestring)
+
// client.end();
}
);

0 comments on commit 7f51b3a

Please sign in to comment.