mongoParse.js
function sortCompare(a,b,sortProperty) {
    var aVal = DotNotationPointers(a, sortProperty)[0].val // todo: figure out what mongo does with multiple matching sort properties
    var bVal = DotNotationPointers(b, sortProperty)[0].val

    if(aVal > bVal) {
        return 1
    } else if(aVal < bVal) {
        return -1
    } else {
        return 0
    }
}
function sortCompare(a,b,sortProperty) {
    var aVal = DotNotationPointers(a, sortProperty)[0].val // todo: figure out what mongo does with multiple matching sort properties
    var bVal = DotNotationPointers(b, sortProperty)[0].val

    if(aVal > bVal) {
        return 1
    } else if(aVal < bVal) {
        return -1
    } else {
        return 0
    }
}
function sortCompare ( a , b , sortProperty ) { var aVal = DotNotationPointers ( a , sortProperty ) [ 0 ] . val // todo: figure out what mongo does with multiple matching sort properties var bVal = DotNotationPointers ( b , sortProperty ) [ 0 ] . val if ( aVal > bVal ) { return 1 } else if ( aVal < bVal ) { return - 1 } else { return 0 } }
compares two documents by a single sort property
compares two documents by a single sort property