Key-Value Pair Sort

http://angularjs.org/

by michiganfootball20

HTML

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script>
<div ng-controller="MyCtrl">
    <table>
        <tr ng-repeat="key in keys(Profile)">
            <td>{{key}}: {{Profile[key]}}</tr>
    </table>
</div>

JavaScript

var myApp = angular.module('myApp', []);

myApp.controller('MyCtrl', function ($scope) {
    $scope.keys = function(obj){return obj? Object.keys(obj) : [];}
    $scope.Profile = {
        "UserID": 1234,
            "User Name": "SomeName",
            "Email Address": "someone@yahoo.com",
            "Age": 29,
            "Occupation": ""
    };
});