It’s not a problem narrow down the query like you said. Just took that code for showing… But i still need to get a single value from the query. Like this, if i just want the username to print in console using node.js… console.log(username ??);

How can i print the value for username only. Without json format?

I have gone through your game api before posting this thread… and it’s not really much help

Best Regards

edit:
Try 2 is fixed… Now i only need to figure out how to print a single value from an n1ql query. Without the json format. =)

Being that Couchbase is a NoSQL document database, it is going to be pretty difficult to escape from JSON data ;-).

To get the username of a particular document returned it would be something like:

console.log(res[x].username);

Where x is a particular index in your result array. You will always have an array of JSON data returned from a N1QL query. Each object in the array will represent a particular result that matched your query.