title: Angularjs checking typeof array
body: <p>I have some data which can be string or array. So if it is a string, I want to display it, and if it is an array, I want to display length of it. </p>
  
  <p>This how data look like:
  <a href="https://i.stack.imgur.com/PqIuU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PqIuU.png" alt="enter image description here"></a> or <a href="https://i.stack.imgur.com/ZjWOB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZjWOB.png" alt="enter image description here"></a></p>
  
  <p>Trying to check data type of:</p>
  
  <pre><code>&lt;div class="properties"&gt;{{typeof(row.contact)=="object" ? 1 : 2}}&lt;/div&gt;//with 1 and 2 its more simplify.
  </code></pre>
  
  <p>But in both cases it will display <code>2</code>. Why is it so and how can I fixed it?</p>
  
  <p>P.S.</p>
  
  <pre><code> {{angular.isArray(value)? 1 : 2}}//result the same
  </code></pre>