Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better API for inflating first-level object keys? #17

Closed
dougwilson opened this issue Aug 11, 2014 · 1 comment · Fixed by #19
Closed

Better API for inflating first-level object keys? #17

dougwilson opened this issue Aug 11, 2014 · 1 comment · Fixed by #19
Labels
Milestone

Comments

@dougwilson
Copy link
Contributor

Hi, so an issue was brought up in expressjs/connect-multiparty#11 earlier today. Basically it boils down to a need for a real object conversion API here, I think. I would like to be able to pass in an object and have this library expand out just the keys into a rich object and leave the values alone.

Basically I would like to have something that takes

{
  "user[name]": {"pop[bob]": 3},
  "user[email]": null
}

and gives

{
  "user": {
    "name": {"pop[bob]": 3},
    "email": null
  }
}

and it only looks at the first level keys and does not look down into the objects. I hope I'm making sense, I'm in a rush :)

@hueniverse
Copy link
Contributor

We rely on the old behavior in https://github.com/hapijs/hapi/blob/master/lib/payload.js#L309 so this is actually a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants