How order a view result by reduced value? CouchDB

Posted by Lucas Renan on Stack Overflow See other posts from Stack Overflow or by Lucas Renan
Published on 2010-03-12T20:37:13Z Indexed on 2010/03/12 20:47 UTC
Read the original article Hit count: 488

Filed under:
|

Can I order the result of a view by the value, returned by reduced?

{
    "rows": [
        {"key":"bob","value":2},
        {"key":"john","value":3},
        {"key":"zztop","value":1}
     ]
}

I wanna a result like this:

{
    "rows": [
        {"key":"zztop","value":1},
        {"key":"bob","value":2},
        {"key":"john","value":3}

     ]
}

© Stack Overflow or respective owner

Related posts about couchdb

Related posts about JavaScript