Q: How to filter a view by id field in CouchDB? I have a view which outputs the following JSON: 
{"total_rows":26,"offset":0,"rows":[
{"id":"SIP-13","key":[1506146852518,"SIP-13"],"value":{"clientId":"CLIENT-2","orderCount":2}},
{"id":"SIP-12","key":[1506147024308,"SIP-12"],"value":{"orderCount":1}},
{"id":"SIP-14","key":[1506159901457,"SIP-14"],"value":{"orderCount":1}},
{"id":"SIP-15","key":[1506161053712,"SIP-15"],"value":{"clientId":"CLIENT-2","orderCount":2}},
{"id":"SIP-16","key":[1506448298050,"SIP-16"],"value":{"clientId":"CLIENT-3","orderCount":1}}
]}

...and I want to get the row with id: "SIP-15" here. How can I do that?

A: You have to use complex keys. The first field indexed can be anything and the second must be SIP-15.
Query : 

?startkey=[null,"SIP-15"]&endkey=[{},"SIP-15"]

