title: How to hide table column if all json value is null for any property using angular js
body: <p><a href="http://plnkr.co/edit/Ixvp8B0dRwOBDHflmu2j?p=preview" rel="nofollow">Plunker sample</a> </p>
  
  <blockquote>
    <p>How to hide table column if all json value is null for any property
    using angular js</p>
  </blockquote>
  
  <p>index.js</p>
  
  <pre><code>var app = angular.module('plunker', []);
  app.controller('MainCtrl', function($scope) {
    $scope.name = 'World';
    $scope.isArray = angular.isArray;
    $scope.data = [{
      "Id": null,
      "Title": "US",
      "Description": "English - United States",
      "Values": [{
        "Id": 100,
        "LanId": 1,
        "KeyId": 59,
        "Value": "Save"
      }]
    }, {
      "Id": null,
      "Title": "MX",
      "Description": "test",
      "Values": [{
        "Id": 100,
        "LanId": 1,
        "KeyId": 59,
        "Value": "Save"
      }]
    }, {
      "Id": null,
      "Title": "SE",
      "Description": "Swedish - Sweden",
      "Values": [{
        "Id": 100,
        "LanId": 1,
        "KeyId": 59,
        "Value": "Save"
      }]
    }]
    $scope.cols = Object.keys($scope.data[0]);
    $scope.notSorted = function(obj) {
      if (!obj) {
        return [];
      }
      return Object.keys(obj);
    }
  });
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;table border=1 style="margin-top: 0px !important;"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th ng-repeat="(k,v) in data[0]"&gt;{{k}}&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr ng-repeat="item in data"&gt;
        &lt;td ng-repeat="(prop, value) in item" ng-init="isArr = isArray(value)"&gt;
          &lt;table ng-if="isArr" border=1&gt;
            &lt;thead&gt;
              &lt;tr&gt;
                &lt;td&gt;
                  &lt;button ng-click="expanded = !expanded" expand&gt;
                    &lt;span ng-bind="expanded ? '-' : '+'"&gt;&lt;/span&gt;
                  &lt;/button&gt;
                &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                &lt;th ng-repeat="(sh, sv) in value[0]"&gt;{{sh}}&lt;/th&gt;
              &lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody&gt;
              &lt;tr ng-repeat="sub in value" ng-show="expanded"&gt;
                &lt;td ng-repeat="(sk, sv) in sub"&gt;{{sv}}&lt;/td&gt;
              &lt;/tr&gt;
            &lt;/tbody&gt;
          &lt;/table&gt;
          &lt;span ng-if="!isArr"&gt;{{value}}&lt;/span&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>