Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. {
  2. "_id": "P17-223",
  3. "property": "P17",
  4. "itemid": 223,
  5. "labels": [
  6. {
  7. "language": "en",
  8. "value": "Greenland"
  9. },
  10. {
  11. "language": "es",
  12. "value": "Groenlandia"
  13. },
  14. {
  15. "language": "de",
  16. "value": "Grönland"
  17. }
  18. ]
  19.  
  20. DBCursor cursor = getCollection().find(query);
  21. BasicDBObject orderBy = new BasicDBObject("labels[0].value", 1);
  22. cursor.sort(orderBy);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement