AngularJS: Object

by Alberto Naperi Jr.

HTML

<div ng-controller="YourCtrl">
    {{result.message.name}}    
</div>

JavaScript

'use strict';

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

app.controller('YourCtrl', ['$scope', function($scope) {

        $scope.result = {
            "id": 2360,
            "subject": "Meeting Postponed Status",
            "message": "{\"name\":\"Riana\",\"status\":\"Postponed\",\"meeting\":\"Approval No 342\",\"postponedDate\":\"2015-06-24 18:30:00\",\"postponedTime\":\"13:02:57\"}",
            "modifiedDate": "2015-06-29 17:09:59",
            "categoryId": 1
        };

        $scope.result.message = JSON.parse($scope.result.message);

        console.log($scope.result);

    }]);