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

Fixed: format multilevel json to querystring correctly #3696

Closed
wants to merge 3 commits into from
Closed

Fixed: format multilevel json to querystring correctly #3696

wants to merge 3 commits into from

Conversation

guanbo
Copy link

@guanbo guanbo commented Aug 22, 2013

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

encodeUriQuery(v));
});
});
toQueryString(params, parts)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semi-colon?

@IgorMinar
Copy link
Contributor

I'm sorry, but I wasn't able to verify your CLA signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let me know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@guanbo
Copy link
Author

guanbo commented Dec 9, 2013

@IgorMinar I have sign CLA, but my gmail box have not receive any feedback. So I not confirm sign success.

if(Googler === 'work for google') {
  I am not.
} else {
  What's means?
}

@guanbo
Copy link
Author

guanbo commented Jan 19, 2014

renew pr #5885 for rebase on v1.2.9

@guanbo guanbo closed this Jan 19, 2014
@guanbo guanbo deleted the multilevel-querystring-from-json branch January 19, 2014 13:27
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.

3 participants