I want to access the string from the list that is in the dictionary: function changeArea() { alert({{list_areas.British_Columbia}}); }
I get what I want in the generated HTML: function changeArea() { alert(['Metro Vancouver', 'Metro Vancouver A', 'Sunshine Coast']); } However, when I tried using: function changeArea() { alert({{list_areas.British_Columbia.0}}); } I get this: function changeArea() { alert(Metro Vancouver); } (it is not a string) Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---