title: Object to array - quick conversion
body: <p>I have a Json structure of this kind:</p>
  
  <p><img src="https://i.stack.imgur.com/3xTnd.png" alt="enter image description here"></p>
  
  <p>this is generate from the backend (I'm using Firebase) and put in a variable :</p>
  
  <pre><code>var newJson = {}
  </code></pre>
  
  <p>I'm using AngularJS and ng-repeat though this variable to show the results - and it works. I d like to order the JSON by votes property and I have tried use the angularJS</p>
  
  <pre><code>| orderBy: 'vote' "
  </code></pre>
  
  <p>But that doesn't work cos I'm "ng-repeating" though a JSON and not array.
  I have tried different solutions showed at <a href="https://github.com/angular/angular.js/issues/1286" rel="nofollow noreferrer">https://github.com/angular/angular.js/issues/1286</a>
  but I couldn't make work any of them.</p>
  
  <p>So I thought to go for the easy road and converting my JSON to array.
  I ve tried :</p>
  
  <pre><code> var arreyM = [];
   for (var i = 0; i &lt; $scope.newJson.length; i++) {
        arreyM.push(name: $scope.newJson[i].name, pic: $scope.newJson[i].pic, vote:$scope.newJson[i].vote); 
   }
  </code></pre>
  
  <p>but it gave me error - I guess the syntax is wrong. </p>