<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"></script>
    <script src="script.js"></script>
    
  </head>

  <body ng-app="app" ng-controller="ctrl">
    {{kk}}
  </body>

</html>
var app = angular.module('app', []);
app.controller('ctrl',
  function ($scope) {
        $scope.masterClausesList = 
    [  
{
    "Id":1,
    "ID":1,
    "Title":"Platform",
    "Desc":"Our Platform provides our users with a variety of resources to facilitate organizing of groups, (a \"Meetup\" or \"Meetup Group\"), and creating of a network (\"Meetup Everywhere\").",
    "Checked":null,
    "CCategory":"Company Contracts"
  },
  {
    "Id":2,
    "ID":2,
    "Title":"Membership",
    "Desc":"Our Platform provides our users with a variety of resources to facilitate organizing of groups, (a \"Meetup\" or \"Meetup Group\"), and creating of a network (\"Meetup Everywhere\").",
    "Checked":null,
    "CCategory":"Company Contracts"
  },
  {
    "Id":3,
    "ID":3,
    "Title":"Payment",
    "Desc":"Limited to 100 days",
    "Checked":null,
    "CCategory":"Company Contracts"
  }
];
    $scope.selectedContract = [];
    $scope.selectedContract.clausesSelected = 
    [
     {
        "Id":1,
        "ID":1,
        "Title":"Platformli",
        "SortId":null,
        "Desc":"Our Platform provides our users with a variety of resources to facilitate organizing of groups, (a \"Meetup\" or \"Meetup Group\"), and creating of a network (\"Meetup Everywhere\").",
        "CCategory":null,
        "CUSER":null,
        "CCONTRACTHDRID":"6",
        "CCLAUSEMSTID":"1"
      }
    ];

    $scope.kk = '___';



var k2 = [];
angular.forEach($scope.masterClausesList, function (value1,key1) {
  angular.forEach($scope.selectedContract.clausesSelected, function (value2,key2) {
    
  });
});

var log = [];
angular.forEach($scope.masterClausesList, function(value) {
  angular.forEach($scope.selectedContract.clausesSelected, function (value2) {
    if(value2.CCLAUSEMSTID == value.Id){
      value.Checked = true
      this.push(value);
    }else{
     this.push(value);
    }
  },log);
}, log);

$scope.kk = log;
});
/* Styles go here */