How to get doc by using document property either id


good day guys

i’m looking for fetching a doc by with out using doc id

like my json

bizName : dummy,
cby : xxx,

i need to fetch a doc by using docid

i have a function to fetch a doc by doc_id.

let help me to fix this.

looking for your reply


To find a document using something other than _id, you need to create a view and then query it. In the view’s map function, emit that property’s value as the key. Then query the view, setting the Query object’s key property to the value you’re looking for.

hi jens

can you plz tell me how to set query object’s key in view, make me confused plz give any examples

Please refer to our query tutorial for an example of the same