title: Wordpress Rest API: How to query Category Name by id in Angularjs
body: <p>I am working on my first app, based on Ionic and Angularjs connected to Wordpress REST Api.</p>
  
  <p>I need to display the category name, but the WP-API V2 post list (example.com/wp-json/wp/v2/posts) has only the category ids.</p>
  
  <p>In order to get the categories I need to make a second http request to example.com/wp-json/wp/v2/categories</p>
  
  <p>This is my function in the controller to load all posts and it works fine.</p>
  
  <pre><code> var postsApi = $rootScope.url + 'posts';      
  $scope.loadPosts = function() {
  
  // Get all of our posts
  DataLoader.get( postsApi ).then(function(response) {
  
    $scope.posts = response.data;
  
    $log.log(postsApi, response.data);
  
  
  }, function(response) {
    $log.log(postsApi, response.data);
  });
  </code></pre>
  
  <p>but how do I achieve to parse the category id, that i get from example.com/wp-json/wp/v2/posts with example.com/wp-json/wp/v2/categories to get the category name without making a http request every single loop?</p>