title: How to add items from multiple arrays into another array?
body: <p>I have an array of objects I'm looping over with Vue. Each object has a key value pair with the value being another array. How can I loop over each object and then loop over each array in that object to add all unique items to one array?</p>
  
  <pre><code> const objects: [
     {
        hungry: true,
        name: "pete",
        fruits: ["banana", "orange"]
     },
     {
        hungry: false,
        name: "sam",
        fruits: ["grapes", "kiwi"]
     },
     {
        hungry: true,
        name: "george",
        fruits: ["pear", "mango"]
     }
   ]
  </code></pre>
  
  <p>This gets me close but it just adds each inner array to the outer array, not the unique items in that array ... </p>
  
  <pre><code>      uniqueFruits: function() {
              const fruitList = [];
              this.objects.forEach((object)=&gt;{
                  if (!fruitList.includes(object.fruits)) {
                      fruitList.push(objects.fruits);
                  }
              });
              return fruitList;
          }
  </code></pre>
  
  <p>I know I need to loop inside again somehow to get the items in the inner array. Any help?</p>