Angularjs

Get Keys & Values Together With Ng Repeat

Posted by Weston Ganger on August 20, 2014

When using ng-repeat you may find yourself wanting get the keys or field names of the json values you are accessing, such as for server side errors.

This can be achieved using the following technique:


<div ng-repeat="(key,value) in data"></div>

Posted in Angular and Tagged with angular angularjs json 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts