title: How do i filter array of objects nested in property of array objects?
body: <p>I have model like this:</p>
  
  <p><code>var model = [{id: 1, prices: [{count: 2}, {count: 3}]}, {id: 2, prices: [{count: 2}]}, {id: 3, prices: [{count: 3}]}];</code> </p>
  
  <p>and I need to filter this objects of array useing property <code>count</code> and I will need to return matched objects in three scenarios:</p>
  
  <ol>
  <li>if the objects have two objects in array <code>prices</code>,</li>
  <li>if the objects have one object in array <code>prices</code> matching <code>count:2</code>,</li>
  <li>if the objects have one property in array <code>prices</code> matching <code>count:3</code>.</li>
  </ol>
  
  <p>so..when i click the button without assigned value i wanna see all objects, when i click button with value = 2 i wanna see objects with count: 2 and when i click the button with value = 3 i wanna get objects with count: 3, i must do this in AngularJS –</p>