Quantcast
Channel: How to filter with a CouchDB view on two (or more) keys - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to filter with a CouchDB view on two (or more) keys

$
0
0

I have the following json (simplified) objects in a couchdb storage:

[{"_id": "5ea7a53e670b432e0fe22a7bc10024db","_rev": "1-ae70c8906f7aa6d73539a89f7ad960ee","type": "job"}, {"_id": "5ea7a53e670b432e0fe22a7bc10041d9","_rev": "4-fa0ba68c35ca548b497a7309389f9087","type": "scan","job_id": "5ea7a53e670b432e0fe22a7bc10024db","number": 1}, {"_id": "5ea7a53e670b432e0fe22a7bc100520e","_rev": "4-3e6b1a028786c265ecb7362e245d049e","type": "scan","job_id": "5ea7a53e670b432e0fe22a7bc10024db","number": 2}]

I want to make a post request with the keys ["5ea7a53e670b432e0fe22a7bc10024db", 2] (the job id and a scan number). How can I make a map function for a view to filter out the job that has the given id and the measurement that matches the job_id and the number?

Thanks,Radu


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images