How to access object property with invalid characters

后端 未结 2 1257
-上瘾入骨i
-上瘾入骨i 2020-11-28 16:36

I am writing an Angular app that interfaces with a Google Analytics API already in use. The data returned by Google is prefixed with \"ga:\" as in the example \"ga:newVisit

2条回答
  •  悲&欢浪女
    2020-11-28 17:21

    You need to access it as if it were an associative array:

    {{total['ga:newVisits']}}
    

提交回复
热议问题