title: ng-repeat on non array object
body: <p>I know that ng-repeat works only on array.     </p>
  
  <p>My problem is when I don't know if the object that I get from the server, is array, or only object.<br>
  I need to determine dynamically if it's array or object, and only if it's array use ng-repeat.    </p>
  
  <p>My question is what is the best way implement using ng-repeat with condition - only if the object is an array?</p>
  
  <p>I tried to solve the problem this way:</p>
  
  <pre><code> &lt;div ng-if="Array.isArray(myObj)"ng-repeat="item in myObj"&gt;
        &lt;do-some-stuff item='item'&gt;&lt;/do-some-stuff&gt;
   &lt;/div&gt;
   &lt;do-some-stuff ng-if="!Array.isArray(myObj)" item='myObj'&gt;&lt;/do-some-stuff&gt;
  </code></pre>
  
  <p>But it's not working.</p>