title: Looping through the array inside another array
body: <p>First array:</p>
  
  <pre><code>var products_cart = [1, 2, 2]; (these are the products_id's)
  </code></pre>
  
  <p>Second array:</p>
  
  <pre><code>var cart_details =
  [{
  product_id: 1,
  product_name: 'product love',
  category_name: 'love'
  },
  {
  product_id: 2,
  product_name: 'product birthday love',
  category_name: 'birthday'
  }]
  </code></pre>
  
  <p>I want to loop through the elements of the array products_cart and use the product_id from products_cart to render details from cart_details (loop through them I suppose), how is this possible?</p>
  
  <p>EDIT:</p>
  
  <p>I think some of you got me wrong, I basically want this to render something like this:</p>
  
  <pre><code>[{
  product_id: 1,
  product_name: 'product love',
  category_name: 'love'
  },
  {
  product_id: 2,
  product_name: 'product birthday love',
  category_name: 'birthday'
  },
  {
  product_id: 2,
  product_name: 'product birthday love',
  category_name: 'birthday'
  }
  ]
  </code></pre>
  
  <p>My mistake, I wasn't clear enough.</p>