title: Removing Specific Object In Array Based On Property?
body: <p>I have an array of drink toppings and want to remove the ones that aren't relevant to the drink, this is the code I have, but I can't figure out how to remove the topping from the array if it isn't within the criteria. </p>
  
  <p>I can only remove at index path and this can change if we added more toppings etc so didn't seem accurate?</p>
  
  <pre><code>for toppings in self.toppings {
      if self.selectedDrink.name == "Tea" {
          if toppings.limit == "C" {
              self.toppings.remove(at: toppings)
          }
      }
  }
  </code></pre>
  
  <p>Essentially if the user selected Tea it looks for toppings limited for coffee and then I need to remove those ones that respond to the "C" property, but I can't see how?</p>
  
  <p>Thanks for the help!</p>