title: Multi query in AngularJS
body: <p>I need to develop a page with AngularJS. </p>
  
  <p>I have two tables. </p>
  
  <pre><code>Table 1 : StateList  
  
  StateCode   | StateName
  -------------------------------
  AZ          |  ARIZONA      
  CA          |  CALIFORNIA
  NY          |  NEW YORK
  
  Table 2: CustomerDetail
  Name    |  BornState  | LivingState
  -----------------------------------------
  Peter   |  AZ         | NY
  Bob     |  CA         | AZ
  </code></pre>
  
  <p>Want to display list like this on HTML Page.</p>
  
  <pre><code>Customer Name   | Customer BornState    | Customer LivingState
  ------------------------------------------------------------------------
  Peter           | ARIZONA               | New York
  Bob             | CALIFORNIA            | ARIZONA
  </code></pre>
  
  <p>Instead of state code, I want to display State Name for each type of state information, e.g BornState and LivingState.
  I am able to fetch list from Table 2:CustomerDetail but <strong><em>how I can convert state code with state name for each type of state information?</em></strong></p>
  
  <p>Thanks in advance</p>
  
  <p>Adding more Details</p>
  
  <p>I have $stateProvider as below</p>
  
  <pre><code>.state("customerDetail",{
                          url:"/customer/detail/:customerId",
                          templateUrl:"app/customer/customerDetail.html",
                          controller: "DetailCtrl as vm",
                          resolve: {
                              customer: function (Restangular, $stateParams) {
                                  return Restangular.one('customer', $stateParams.customerId).get();
                              }
                          }
                      })
  </code></pre>
  
  <p>This give me array like</p>
  
  <pre><code>{"customerId":"1","customerName":"Bob","BornState":"CA","LivingState":"AZ"}             
  </code></pre>
  
  <p>my state array list is like </p>
  
  <pre><code> [{"Code":"NY","Name":"New York"},{"Code":"AZ","Name":"ARIZONA"},{"Code":"CA","Name":"CALIFORNIA"}]
  </code></pre>
  
  <p>I want to display full state name instead of state code</p>