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