Struggling to properly parse this JSON chunk, as my attempts have not been successful. The structure of the JSON is outlined below. I am aiming to use ng-repeat on all attributes in order to display "Content" and "Title" within a div.
JSON:
{
"Hits": [{
"Content": "Lorem ipsum",
"Id": "Lorem ipsum",
"IllustratingImage120Url": "Lorem ipsum",
"SearchPublishDate": "Lorem ipsum",
"SearchUpdateDate": "Lorem ipsum",
"Section": "Lorem ipsum",
"Title": "Lorem ipsum",
"Url": "Lorem ipsum"
}, {
"Content": "Lorem ipsum",
"Id": "Lorem ipsum",
"IllustratingImage120Url": "Lorem ipsum",
"SearchPublishDate": "Lorem ipsum",
"SearchUpdateDate": "Lorem ipsum",
"Section": "Lorem ipsum",
"Title": "Lorem ipsum",
"Url": "Lorem ipsum"
}
}]
}
After loading the JSON through a service and assigning it to:
$scope.result = result.data;
I am able to retrieve the JSON without any issues. However, I am seeking to utilize ng-repeat on its attributes. Currently, the entire JSON object gets rendered instead of just the "Content" attribute that I want to display.
HTML:
<ul>
<li ng-repeat="Content in result">{{ Content }}</li>
</ul>