I need to call a service with returns a JSON array. But the array element name can contains several words.
example
{"commerciele productnaam":"my product","looptijd in jaren":"0", etc... }
I am writing an angular controller which fetches the data, but I am unable to get the value of "commerciele productnaam".
<div ng-controller="PriceController as pc" ng-init="pc.getPrices()">
<h1>Price from Pricing Service</h1>
{{ pc.prices.msg.HOW TO ACCESS COMMERCIELE PRODUCTNAAM }}
<br/>
<br/>
MSG == {{ pc.prices.msg }}
</div>
Is it possible to fetch the value via the variable name anyhow ?
[]pc.prices.msg['HOW TO ACCESS COMMERCIELE PRODUCTNAAM']notation that takes the property name string.