Parsing JSON with spaces in key name with AngularJS
angularjs, html, javascript, json
Solution
Please try this
{{friends['my name']}}
Problem
I have a json which has spaces in key names. The JSON has the following format ``` { "response":{"docs":[ { "my name":"krammer", "job": "stackexchange" } } } ``` While using ng-repeat to get the parameters into a list, I use the following code ``` {{friends.['my name']}} ``` But this gives an empty output. While ``` friends.my name ``` gives an error. So how can the key names with empty spaces be accessed using AngularJS ?