Cloudant couchdb query custom sort
<p>I want to sort the results of couchdb query a.k.a mango queries based on custom sort. I need custom sort because if <code>Status</code> can be one of the following:</p>

<ol>
<li>Active = 1</li>
<li>Sold = 2</li>
<li>Contingent = 4</li>
<li>Pending = 3</li>
</ol>

<p>I want to sort the results on <code>Status</code> but not in an alphabetical order, rather my own weightage I assign to each value which can be seen in the above list. Here's the selector for <code>Status</code> query I'm using:</p>

<pre><code>{type:"Property", Status:{"$or":[{$eq: "Pending"}, {$eq:"Active"}, {$eq: "Sold"}]}}
</code></pre>

<p>If I use the <code>sort</code> array in my json with Status I think it'll sort alphabetically which I don't want.</p>