Query json property Couchbase.lite 2.0



I am trying to do a .Where clause where the “doctype” = “Contact” and “doc.MiddleName” = “Nancy”
I am using Xamarin C#.

Here is the document
“CustomerCode”: “Bethany”,
“doc”: {
“FirstName”: “Ruth”,
“Id”: “Contact::78b86e91-5042-4b7a-8919-87189acb9df5”,
“LastName”: “Morris”,
“LastUpdated”: “636622580381941997”,
“Login”: null,
“MiddleName”: “Nancy”,
“doctype”: “Contact”

Here is the query:
using (var query = QueryBuilder.Select(SelectResult.All())

Any help is appreciated!


Expression.Property can handle nested values so in your case Expression.Property("doc.MiddleName") will specify the value you are after.


Thanks! That was too obvious!