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

Doesn't parse JSON keys with spaces #223

Closed
htmlr opened this issue Apr 23, 2012 · 2 comments
Closed

Doesn't parse JSON keys with spaces #223

htmlr opened this issue Apr 23, 2012 · 2 comments

Comments

@htmlr
Copy link

htmlr commented Apr 23, 2012

I'm working with a webservice that has the following pair {Company Name: ACME} in the JSON response and Handlebars is unable to read "Company Name" value . Tried wrapping the key in quotes but it still doesnt work - is there another way to do this or is this a parsing issue?

@htmlr htmlr closed this as completed Apr 23, 2012
@htmlr
Copy link
Author

htmlr commented Apr 23, 2012

Apologies , solved by enclosing keys in square brackets

E.g. {{[Company Name]}}

@philfreo
Copy link

I needed access to a nested object property with a space
{{ foo.bar.x }} for "x" (I tried {{ foo.bar['x y'] }} originally) but thanks to this I'm using {{ foo.bar.[x y] }}. Glad I found this ticket - didn't see anything in the documentation (you might want to add something about it)

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

No branches or pull requests

2 participants