title: AngularJS: Call JSON array value in nested Controller
body: <p>How to call Json array value in other controller. Basically i work with nested controller. Nested controller will return first character of firstname and lastname.</p>
  
  <p>For example if my first name is Anand Jee then It will return AJ, Rohan Kumar then it will return RK.</p>
  
  <p>My AngularJS code.</p>
  
  <pre><code>//create module
  var myApp = angular.module("myApp", []);
  
  //create controller
  
  myApp.controller("empCtrl", function ($scope) {
      var Employees = [
          { FirstName: "Anand", LastName: "Jee", Roles: "Web Developer", Technology: ".NET" },
          { FirstName: "Pritus", LastName: "Dubey", Roles: "Window App Developer", Technology: "XAMARIN" },
          { FirstName: "Vineet", LastName: "Rai", Roles: "Web Developer", Technology: ".NET" },
          { FirstName: "Nilesh", LastName: "Pathak", Roles: "UI/UX Developer", Technology: "Photoshop" },
          { FirstName: "Vikesh", LastName: "Juyal", Roles: "Web Developer", Technology: "PHP" }
      ];
      $scope.Employees = Employees;
  });
  
  myApp.controller("EmpShortName", function ($scope) {
      $scope.getEmpShortName = function () {
  
          //$scope.empShortName  = $scope.Employees.FirstName + " " + $scope.Employees.LastName;//here is problem
          $scope.empShortName = "NP";//For temp declaration
          return $scope.empShortName;
      };
  });
  </code></pre>
  
  <p><a href="https://plnkr.co/edit/8cw9anm9dEbAvtYltpfF?p=preview" rel="nofollow">PLUNKER DEMO</a></p>