title: How to assign value and scope to two concatenated string
body: <p>My HTML Code:-</p>
  
  <pre><code>&lt;ul class="sub-menu collapse"&gt;
       &lt;li ng-hide="abcMenuHide" ng-click="showModal('abcMaster')"&gt;
          &lt;a&gt;Add/update listOne&lt;/a&gt;&lt;/li&gt;
       &lt;li ng-hide="xyzMenuHide" ng-click="showModal('xyzMaster')"&gt;
          &lt;a&gt;Add/Update listTwo&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt; ... and so on
  </code></pre>
  
  <p>I am trying to hide the <code>&lt;li&gt;</code> elements on the basis of values assigned to <code>ng-hide</code>.
  I am making this value in directive like this:-</p>
  
  <pre><code>$scope.menuListHide = function(){
          for (var group in $scope.data) {
              if (group != "sectionOne") {
                  for (var list in $scope.data[group]) { 
                      for (var key in $scope.data[group][list]) { 
                          if ($scope.data[group][list].view != undefined) {
                              if (!$scope.data[group][list].view) {
                                  $scope.(list+"MenuHide") = true; \\This assignment is wrong also I am not able to attach scope to it.
                              }
                          }
                          else if($scope.data[group][list][key].view != undefined){
                              if (!$scope.data[group][list][key].view) {
                                  $scope.(key+"MenuHide") = true; \\This assignment is wrong also I am not able to attach scope to it.
                              }
                          }
                      }
                  }
              }   
          }
      }
  
  $scope.menuListHide();
  </code></pre>
  
  <p>Is there any way I can assign <code>$scope</code> as well as value to the concatenated string?</p>