title: Append unique values to an array in swift
body: <p>I haven't found anything on that in Swift. Have found how to find unique values on an array, but not this. Sorry if it sounds quite basic...</p>
  
  <p>But I have the following array</p>
  
  <pre><code>var selectedValues = [String]()
  </code></pre>
  
  <p>And the following value that comes from a Parse query</p>
  
  <pre><code> var objectToAppend = object.objectForKey("description")! as! String
  </code></pre>
  
  <p>this is how I'am doing it at the moment.</p>
  
  <pre><code>self.selectedHobbies.append(objectToAppend)
  </code></pre>
  
  <p>But because the query happens repeated times, it ends up appending repeated values. It works, but I just want to not waste memory and only keep unique values.</p>
  
  <p>Any ideas on how to solve that in swift? </p>