I am having troubles getting sorted results from a sync gateway view.
Here is my map function:
{
"views":{
"scenes_for_job":{
"map":"function (doc, meta) { if (doc.type == \"scene\") { emit([doc.job_id, doc.sceneNumber], doc); } }"
}
}
}
And here is my REST call:
My data returning from this has the same doc.job_id for all docs and different doc.sceneNumber for each doc. I would like an ascending sort on sceneNumber.
What am I missing here?
Also, I am only returning the entire doc for debugging purposes, I will remove that later on down the line.
Todd