json patch a doc and reverse the query: