title: Random function in Angular JS
body: <p>I have a json file with questions, so an array. I want to make all the questions to be random. This is my code from the js file, but I don't know why doesn't work.</p>
  
  <pre><code>$http.get('quiz_data.json').then(function(quizData){
          $scope.myQuestions = quizData.data;
          $scope.myQuestions = Math.floor(Math.random()*2);
      });
  </code></pre>
  
  <p>And in the html</p>
  
  <p><code>&lt;div ng-repeat="myQuestion in myQuestions"&gt;
  &lt;p class="txt"&gt;{{myQuestion.question}}&lt;/p&gt;&lt;/div&gt;</code></p>