Hi. The key values in the JSON I am getting back have spaces in them. this, I am not able to use the #: keyNameHere # notation in my template. Additionally, the keys here are custom and will not be the same from customer to customer so I would like to be able to reference them with something like subscript values. Is this possible?
6 Answers, 1 is accepted
0
Hi Brian,
You can use the bracket notation to access JSON keys with spaces within the key property. Please check the following example:
http://jsbin.com/OHEDECOJ/1/edit
Regards,
Kiril Nikolov
Telerik
You can use the bracket notation to access JSON keys with spaces within the key property. Please check the following example:
http://jsbin.com/OHEDECOJ/1/edit
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Brian
Top achievements
Rank 1
answered on 16 Dec 2013, 04:11 PM
Thanks for your assistance, Kiril. Yes, I tried that and it works if I do #= data['Cust Ident'] #, for example. The problem is that the key will not be the same for every call. I need to do something along the lines of #= data[0] # and this is not working for me. Any suggestions?
0
Hello Brian,
In the Kendo UI Templates you can fully execute JavaScript code. You can read more about it here:
http://docs.kendoui.com/getting-started/framework/templates/overview
What I am trying to say is that you can loop through the data object get the key and display its value in the template. Please check this example, showing some dummy data and let me know if it helps:
http://jsbin.com/OHEDECOJ/3/edit
Regards,
Kiril Nikolov
Telerik
In the Kendo UI Templates you can fully execute JavaScript code. You can read more about it here:
http://docs.kendoui.com/getting-started/framework/templates/overview
What I am trying to say is that you can loop through the data object get the key and display its value in the template. Please check this example, showing some dummy data and let me know if it helps:
http://jsbin.com/OHEDECOJ/3/edit
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Brian
Top achievements
Rank 1
answered on 17 Dec 2013, 04:17 PM
Thanks for the information Kiril. I got it working! :)
0
Hello Brian,
I am glad that the information provided was helpful.
In case you have any further questions, please do not hesitate to contact us.
Regards,
Kiril Nikolov
Telerik
I am glad that the information provided was helpful.
In case you have any further questions, please do not hesitate to contact us.
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Hello Brian,
I am glad that the information provided was helpful.
In case you have any further questions, please do not hesitate to contact us.
Regards,
Kiril Nikolov
Telerik
I am glad that the information provided was helpful.
In case you have any further questions, please do not hesitate to contact us.
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!