title: Display json data in Angular.js
body: <p>I am using the below code, I only get Question Ids, but what I need is when I click <code>Save</code> button I want to display <code>questions.id</code>, <code>option.id</code> and <code>selected</code> : <code>true</code> or <code>false</code> below the textbox. Below code is correct but want to make it as like <code>array</code>.</p>
  
  <p><code>controllers.js</code></p>
  
  <pre><code> $scope.save = function() {
          $scope.msg = 'Question IDs:';
          $scope.questions.forEach(function(el){
              console.log(el)
              $scope.msg += el.Id + ',';
          })
   }
  </code></pre>
  
  <p>in <code>$scope.questions</code> all the json data is stored.</p>
  
  <p><code>home.html</code></p>
  
  <pre><code>&lt;div ng-repeat="question in filteredQuestions"&gt;
              &lt;div class="label label-warning"&gt;Question {{currentPage}} of {{totalItems}}.&lt;/div&gt;
              &lt;div class="row"&gt;
                  &lt;div class="row"&gt;
                      &lt;h3&gt;{{currentPage}}. &lt;span ng-bind-html="question.Name"&gt;&lt;/span&gt;&lt;/h3&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="row text-left options"&gt;
                  &lt;div class="col-md-6" ng-repeat="option in question.Options" style="float:right;"&gt;
                      &lt;div class="option"&gt;
                          &lt;label class="" for="{{option.Id}}"&gt;
                             &lt;h4&gt; &lt;input id="{{option.Id}}" type="checkbox" ng-model="option.Selected" ng-change="onSelect(question, option);" /&gt;
                              {{option.Name}}&lt;/h4&gt;
                          &lt;/label&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
  
              &lt;div class="center"&gt;&lt;button ng-click="save()"&gt;Save&lt;/button&gt;&lt;/div&gt;
              &lt;div class="center"&gt;&lt;textarea  rows="5" cols="50"&gt;{{msg}}&lt;/textarea&gt;&lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p><code>csharp.js</code></p>
  
  <pre><code>{
      "quiz": {
          "Id": 2,
          "name": "C# and .Net Framework",
          "description": "C# and .Net Quiz (contains C#, .Net Framework, Linq, etc.)",
          "paragraph": "In 2015 Microsoft released ASP.NET 5.ASP.NET 5 is a significant redesign of ASP.NET.ASP.NET, MVC, and Web Pages are now merged into a single framework named MVC 6.It includes the following features:Linux support OSX support Node.js supportA ngularJS supportTag ,HelpersView, ComponentsWeb ,APIGruntJS ,supportBower, supportNo ,Visual BasicNo Web Forms"
      },
      "config": {
          "shuffleQuestions": true,
          "showPager": false,
          "allowBack": true,
          "autoMove": false
      },
      "questions": [{
          "Id": 1010,
          "Name": "Which of the following assemblies can be stored in Global Assembly Cache?",
          "QuestionTypeId": 1,
          "Options": [{
              "Id": 1055,
              "QuestionId": 1010,
              "Name": "Private Assemblies"
          }, {
              "Id": 1056,
              "QuestionId": 1010,
              "Name": "Friend Assemblies"
          }, {
              "Id": 1057,
              "QuestionId": 1010,
              "Name": "Public Assemblies"
          }, {
              "Id": 1058,
              "QuestionId": 1010,
              "Name": "Shared Assemblies"
          }]
      }, {
          "Id": 1019,
          "Name": "Which of the following does NOT represent Integer?",
          "QuestionTypeId": 1,
          "Options": [{
              "Id": 1055,
              "QuestionId": 1010,
              "Name": "Char"
          }, {
              "Id": 1056,
              "QuestionId": 1010,
              "Name": "Byte"
          }, {
              "Id": 1057,
              "QuestionId": 1010,
              "Name": "Short"
          }, {
              "Id": 1058,
              "QuestionId": 1010,
              "Name": "Long"
          }]
  
      }]
  }
  </code></pre>