I am trying to do the following:
couch.get(dbName, viewURL, {
"key" : "Extra. This is what I want to search for. Extra."
}).then(function(data, status, headers){
if(data.data.rows[0] === undefined){
// nothing exists in the view by this key
}
else console.log(data.data.rows[0]) // gives first JSON element in db
});
My question is if there is a way to query it so that the key only has to contain "This is what I want to search for." and doesnt care about the extra information. I realize that this is not the proper way that key:value pairs should be used, but I need it for a work around.