How to Bind Mixed Json data in AngularJS

Total Post:341

 1011  View(s)
Rate this:
We want to Bind Mixed Json data  in AngularJS. How to bind this Please tell me.
  1. Post:281

    Re: How to Bind Mixed Json data in AngularJS


    Layout = null;


    <!DOCTYPE html>




    <meta name="viewport" content="width=device-width" />

    <script src="~/Scripts/jquery-1.9.1.js"></script>

    <script src="~/Scripts/angular.js"></script>


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

    app.controller('MyCtrl', function ($scope) {

    $scope.alldata = [


    "CompanyName":"Software Pvt Ltd",

    "Employees": ["Johan Kumar", "Anupam Singh", "Surekha Pal", "Maya Koni"],

    "awards": [


    "award": "Gold Partner",

    "year": 2000,

    "by": "Microsoft"



    "award": "Gold Partner",

    "year": 2001,

    "by": "IBM"






    <body ng-app="myApp" ng-controller="MyCtrl">


    <tbody ng-repeat="dat in alldata">


    <td colspan="3">{{dat.CompanyName}}</td>



    <td colspan="3" align="center"><span style="font-weight:bold">Employees</span></td>


    <tr ng-repeat="cont in dat.Employees">

    <td colspan="3">{{ cont}}</td>



    <td colspan="3" align="center"><span style="font-weight:bold">Awards</span></td>


    <tr ng-repeat="aw in dat.awards">

    <td>{{ aw.award}}</td>

    <td>{{ aw.year}}</td>







      Modified On Apr-11-2018 01:53:39 AM