I am currently working with a large JSON file in Angular and trying to iterate through it. The structure of the JSON file is as follows:
{
"subject1":[
{
"title":"titlehere",
"info":"infohere."
}],
"subject2":[
{
"title":"titlehere",
"info":"infohere."
}],
"subject3":[
{
"title":"titlehere",
"info":"infohere."
}]
}
My goal is to display the key for each category, followed by the title underneath it on the page. I have successfully displayed the keys, but I am struggling to retrieve the title for each category. Here is my HTML code snippet:
<div ng-repeat="(key, value) in faqs">
<h3>{{ key }}</h3>
<ul>
<li><a href="#" ng-click="showHide(pageInfo)">{{ value }}</a></li>
</ul>
</div>
I have tried using {{ value.title }}
, but it does not fetch the title. Instead, it displays the entire JSON file as a string. Could anyone provide any suggestions or solutions?