title: How to get object values from Angular local storage.?
body: <p>I have an local storage like this :</p>
  
  <pre><code>localStorage.setItem("memberdata", JSON.stringify($scope.products));                
  
                  $scope.listdata= localStorage.getItem("memberdata");
                  if($scope.listdata){
                      $scope.listdata = JSON.parse($scope.listdata)
                  }else {
                      localStorage.setItem("memberdata", JSON.stringify($scope.products));
                  }
  </code></pre>
  
  <p><code>$scope.products</code> contains the following JSON data :</p>
  
  <pre><code>{
      "member_id": 54,
      "first_name": "Hima",
      "middle_name": "Ganapathy",
      "last_name": "Hegde",
      "joining_date": "2017-28-04",
      "phone": 7411556977,
      "password": "1234",
      "mail": "shivam@abinfosoft.com",
      "system_date": "Apr 28, 2017 2:26:33 PM",
      "society_id": 10,
      "role": [
          {
              "role_id": 4,
              "name": "User",
              "details": "text"
          }
      ],
      "associated": [
          {
              "associated_id": 1,
              "associated_name": "Parent",
              "primary_member_id": 1
          }
      ],
  }
  </code></pre>
  
  <p>In my view if I alert I get all thee JSON data tats right.</p>
  
  <pre><code>alert(localStorage.getItem("memberdata"));
  </code></pre>
  
  <p>I tried to print member name only but not working. Even thow I putted listdata in $scope of my controller.</p>
  
  <pre><code>{{listdata.first_name}} // Working but deleting when page refreshes
  </code></pre>