Given a JSON object (formData), I am trying to skip an object using AngularJS and output RealEstateInfo and PersonalTaxInfo . For my life, I cannot figure out how to get to the name of the property. Any ideas?
By the way, (key, value) does not work. the key gives me the index number, the value of the whole object.
<ul>
<li ng-repeat="item in formsData">
{{item.value}} //What goes here to get "RealEstateInfo" the 1st loop, and "PersonalTaxInfo" the second loop?
</li>
<ul>
$scope.formData = [
{
"RealEstateInfo": [
{
"Group": "General",
"Fields": [
{
"Name": "TitleType",
"Label": "Title Type",
"Type": "dropdown",
},
{
"Name": "NameIfAvailable",
"Label": "Name if available",
"Type": "string"
}]
},
{
"Group": "Personal",
"Fields": [
{
"Name": "TitleType",
"Label": "Title Type",
"Type": "dropdown",
},
{
"Name": "NameIfAvailable",
"Label": "Name if available",
"Type": "string"
}]
}]
},
{
"PersonalTaxInfo": [
{
"Group": "General",
"Fields": [
{
"Name": "TitleType",
"Label": "Title Type",
"Type": "dropdown",
},
{
"Name": "NameIfAvailable",
"Label": "Name if available",
"Type": "string"
}]
},
{
"Group": "PersonalInfo",
"Fields": [
{
"Name": "TitleType",
"Label": "Title Type",
"Type": "dropdown",
},
{
"Name": "NameIfAvailable",
"Label": "Name if available",
"Type": "string"
}]
}]
}]