Is there a way to use client side document on conflict based on a key,value

Looking for an example to resolve conflicts on client side (couchbase lite iOS) based on a value in the document.
If the value of a key in document is true, use the client side document else use server side document.

Suggestions please

The second link goes into detail about the different ways to resolve conflicts (you can adapt the resolution code to your scenario).