Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Conversation

@guanbo
Copy link

@guanbo guanbo commented Jan 19, 2014

Consider follow json convert to http query string

{
    "$or": [
        {
            "username": {
                "$regex": "admin"
            },
            "name": {
                "$regex": "admin"
            }
        }
    ], 
    "limit": 10, 
    "page": 1, 
    "status": {
        "$ne": "removed"
    }
}

TO Query String

GET /users?status%5B$ne%5D=removed&$or%5B0%5D%5Busername%5D%5B$regex%5D=ad&$or%5B1%5D%5Bname%5D%5B$regex%5D=admin

So, we can query mongo directly from angular.js

has rebase on 1.2.9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant