Directly search for a key in the database

We have a requirement wherein we need to search for a value of a key in the database. I will not be knowing the document where the keys are residing, because the keys that i need to search for will come from back-end service. Purely dynamic. Please let me know whether it is possible to achieve with couchbase lite

Just to clarify, you are saying that you have docs like:

{ “animals”: [“rabbit”, “lizard”, “octopus”] }
{ “animals”: [“cat”, “dog”] }
{ “animals”: [“cat”] }

and you want to find all docs that have a “cat” in the list of animals?

No traun. It’s like

documentA - > {name:“Deer”, type: “Herbivorous”, type:“animals”}
documentB - > {title: “The Elephant Whisperer”, author: " Lawrence Anthony", type:“wildlifeBooks”}
documentC → {name:“Tiger”, type: “Carnivorous”,type:“animals”}

without accessing the document, i should be able to fetch the value of keys in the document.
Eg: If i get key “name” from backend service, i will not be knowing which document it belongs to, but i should be able to fetch the value of “name” key in the database

Expected;
name : Deer, Tiger

It has constraints, if there are other documents that has the same key it will lead to a confusion, All the keys in the document needs to be unique for this usecase to work.

Eg:
documentA - > {name:“Deer”, type: “Herbivorous”, type:“animals”}
documentB - > {title: “The Elephant Whisperer”, author: " Lawrence Anthony", type:“wildlifeBooks”}
documentC → {name:“Tiger”, type: “Carnivorous”,type:“animals”}
documentD → {name:“Corbett National Park”, location:“Uttarakhand”,type:“sanctuaries”}

output:
name : Deer,Tiger,Corbett National Park
result is incorrect,because “Corbett National Park” belongs to different document type