Note that there are some explanatory texts on larger screens.

plurals
  1. POmonk find returning bizarre json
    primarykey
    data
    text
    <p>So in node I have this code, which is totally trivial...but it isn't working.</p> <pre><code>var collection = db.get('fisforfriends'); var db = monk('localholst:27017/fisforfriends'); ... var userName = req.body.username; </code></pre> <p>The above works for insertion. Just showing to you guys = ) !</p> <pre><code>console.log(collection.find({}, {username: userName})); </code></pre> <p>Prints a ton of text that I have at the bottom.</p> <p><em>That element doesn't exist in the database, but my function for adding an element worked the other day so I am not worried about that. The function adds it if it doesn't exist</em>.</p> <p>All I have is the console.log call that is printing all of that. I was hoping to have it just print 'false' or something.</p> <pre><code>9 Dec 22:54:27 - [nodemon] starting `node app.js` Express server listening on port 3000 GET / 200 319ms - 427b GET /stylesheets/style.css 304 4ms { col: { manager: { driver: [Object], collections: [Object], options: [Object], _events: {} }, driver: { emitter: [Object], state: 0, _dbconn: [Object], db: null, username: '', password: undefined, admin: [Object], _collections: [Object], bson_serializer: [Object], ObjectID: [Object] }, name: 'fisforfriends', col: { emitter: [Object], state: 0, options: undefined, skinDb: [Object], ObjectID: [Object], collectionName: 'fisforfriends', collection: null, internalHint: null, hint: [Getter/Setter] }, options: {} }, type: 'find', completed: false, opts: { username: 'fa', fields: {}, safe: true }, _events: { error: { [Function: g] listener: [Function] }, success: { [Function: g] listener: [Function] } }, fulfill: [Function], query: {} } 9 Dec 22:54:45 - [nodemon] restarting due to changes... 9 Dec 22:54:45 - [nodemon] C:\Users\hassan\Documents\Hassans_Bravery\fisforfrien ds\routes\index.js </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload