title: Consume REST API in AngularJS Example
body: <p>I have a small application in which i have a 3rd party url which is heavily loaded with JSON data and using those JSON data i want to build a page using AngularJS. Can anybody help me out how to work with it. As i am very new AngularJS. I need a simple working demo. </p>
  
  <p>The complex JSON is like below:</p>
  
  <pre><code>"_embedded":{
        "session":[
           {
              "createdDate":"2017-03-10T14:51:44.000+0000",
              "updatedDate":"2017-03-10T14:51:44.000+0000",
              "deletedDate":null,
              "title":"xxx xxx cccc",
              "track":"cccc cccccc cccc",
              "speaker":"Speaker: ddddddddd",
              "sessionAbstract":"loremipsum loremipsum loremipsum loremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsum",
              "sessionDate":null,
              "_links":{
                 "self":{
                    "href":"http://www.someurl.com/adcbf"
                 },
                 "session":{
                    "href":"http://www.someurl.com/adcbffdfdsf/57457"
                 }
              }
           },
           {
              "createdDate":"2017-03-10T14:51:44.000+0000",
              "updatedDate":"2017-03-10T14:51:44.000+0000",
              "deletedDate":null,
              "title":"xxx xxx cccc",
              "track":"cccc cccccc cccc",
              "speaker":"Speaker: ddddddddd",
              "sessionAbstract":"loremipsum loremipsum loremipsum loremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsumloremipsum loremipsum loremipsum",
              "sessionDate":null,
              "_links":{
                 "self":{
                    "href":"http://www.someurl.com/adcbf"
                 },
                 "session":{
                    "href":"http://www.someurl.com/adcbffdfdsf/57457"
                 }
              }
           }
           ]
           }
  </code></pre>
  
  <p>From the complex json object, i need to get only "title", "track",      "speaker"</p>
  
  <p>I tired this below code:</p>
  
  <pre><code>angular.module('myApp', []).controller('MyController', function ($scope, $http) {
      $scope.findValue = function () {
  
  $scope.complexJSON = [{"_embedded":{
        "session":[
           {
              "createdDate":"2017-03-10T14:51:44.000+0000",
              "updatedDate":"2017-03-10T14:51:44.000+0000",
              "deletedDate":null,
              "title":"xxx xxx cccc",
              "track":"cccc cccccc cccc",
              "speaker":"Speaker: ddddddddd",
              "sessionAbstract":"m",
              "sessionDate":null,
              "_links":{
                 "self":{
                    "href":"http://www.someurl.com/adcbf"
                 },
                 "session":{
                    "href":"http://www.someurl.com/adcbffdfdsf/57457"
                 }
              }
           }       ]
           }
  
  &lt;div ng-app="myApp"&gt;
  &lt;div class="row"&gt;
          &lt;fieldset class="scheduler-border col-lg-6" ng-controller="MyController"&gt;
  &lt;input type="text" class="form-control" placeholder="Session Search" ng-model="getSession.title" /&gt;
  &lt;input type="text" class="form-control" placeholder="Tracks" ng-model="getSession.track" /&gt;
  
  &lt;button type="button" ng-disabled="!getSession" ng-click="findValue()"&gt;Search&lt;/button&gt;
  
  &lt;p data-ng-bind="getSumAssured"&gt;&lt;/p&gt;
              &lt;ul&gt;
                  &lt;li ng-repeat="pa in complexJSON | filter:getSession"&gt;
                      &lt;p&gt;Age: &lt;b data-ng-bind="pa.title"&gt;&lt;/b&gt;
  
                      &lt;/p&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
  </code></pre>