javascript - Accessing data value from JSON with no key value with AngularJS -
I have a question about getting data value from a JSON array which is not a key value in the corner All the examples have seen to get value with a key, but I am not able to understand this piece.
The JSON that is returned from ASP is quite complex and looks like this ...
[{" ": 796}] Then use this in the controller
$ http ({method: 'GET', url: 'api / getnumassets'}).}); Now when I use the snippet below to get the number, I get the following value: {"": 796 } When I want to display it 796
& lt; Div class = "number" & gt; {{NumAssets}} & lt; / Div & gt; & Lt; Div class = "desc" & gt; {{'Viewport TotAssets' | Translation]} I have tried many different accessories on numAssets expression, but I still have some luck. Any help would be greatly appreciated!
if object obj = {"": 796} By way of: obj [']] .
Comments
Post a Comment