{
"websites": [{
"A": "www.foo.com"
}, {
"B": "www.boo.com"
}, {
"C": "www.zoo.com"
}]
}
I have the above JSON array which my controllers inserts into the scope by doing the following:
$http.get('data/websites.json')
.success(function (data) {
$scope.websites = data;
});
In my view, I have a variable that's either A, B or C. I just need to display the corresponding website in the view.
So - to sum it up:
In my view, I want to be able to do something like: {{websites.website.B}} and it would show the corresponding website URL.