How to use doesNotMatchQuery in Parse (Version 2.3.7)

Aka: how to exclude certain results from the query

It took me waaay too long to figure this out, so here you have the solution (I could only find the rudementary documentation of the parseplatform - just something that is autogenerated with comments.

var Book = Parse.Object.extend('Book');
const bookQuery = new Parse.Query(Book);

const bookCompletionQuery = new Parse.Query(Book);
bookCompletionQuery.contains('completedBy', userId);

var today = new Date();
bookQuery.greaterThan('doUntil', today);
bookQuery.doesNotMatchQuery('completedBy', bookCompletionQuery)
bookQuery.contains('users', userId)
bookQuery.find().then(function (books) {

What I couldn't get in the beginning is, how you were supposed to plug in the query into the doesNotMatchQuery. As it turns out you have to create a completely seperate query and put in the name of as a parameter into the method - pretty easy.