I'm not sure if this is generally related to AngularJS, and if it is just JSON.
Anyway, let's say we have the following JSON:
$scope.dataSets = { "names": ["Horace", "Slughorn", "Severus", "Snape"], "genders": ["Male", "Female"] }
Now I use the ng-repeat directive to print above:
<div ng-repeat="data in dataSets> //Continue readig to know what I am expcting here </div>
What I expect in the <div></div> tags is to type "name" and "gender". That is, I want to print JSON keys. I have no idea what keys are, how anything can be in them. How can i do this?
json angularjs
callmekatootie Mar 20 '13 at 14:00 2013-03-20 14:00
source share