As-Type Ordering With JSON Traversal

JSON traversal appears to always use 'as-text' operators. Therefore, I see only two ways to order a query by a non-text JSON field: (1) explicitly type cast or (2) use a custom expr. I would prefer to avoid these since (1) requires tracking database field types in the application and (2) likely requires re-implementing the JSON traversal logic. Is there another way to order that I have missed or a plan to implement 'as-type' JSON operators?

Example in REPL:

db.saveDocs('test', [{ total: 1 }, { total: 2 }, { total: 10 }])
db.test.findDoc({}, { order: [{ field: 'body.total', direction: 'DESC' }]})              // Result [2, 10, 1]
db.test.findDoc({}, { order: [{ field: 'total', direction: 'DESC' }], orderBody: true }) // Result [2, 10, 1]
db.test.findDoc({}, { order: [{ field: 'body.total', direction: 'DESC', type: 'int' }]}) // Works but I'd like to avoid
db.test.findDoc({}, { order: [{ expr: "body->'total'", direction: 'DESC' }]})            // Works but I'd like to avoid

I would be happy to write a PR if there is need/interest. Thank you for this project, it's great!