[feedhenry-dev] Using 'sort' with fh.db API
David Martin
davmarti at redhat.com
Tue Nov 22 14:55:03 UTC 2016
Picked this up on slack, but thought others might find it useful (Thanks
Evan, Philip & Chad)
An example of how to sort fh.db results:
var options = {
"act": "list",
"type": collectionName,
"sort" : {lastName: 1} // sort JSON results by lastName
(ascending). Use -1 for descending
};
Probably something worth adding to the docs, so i added
https://issues.jboss.org/browse/FH-2894
Evan mentioned that "this might only work if you've upgraded the db since
it appears to follow the mongodb syntax/format"
Has anyone tried it without an 'upgraded' db?
--
David Martin
Red Hat Mobile
Twitter: @irldavem
IRC: @irldavem (feedhenry, mobile-internal)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/feedhenry-dev/attachments/20161122/67a31d0c/attachment.htm>
More information about the feedhenry-dev
mailing list