title: Swift I can't append two different strings on the same array
body: <p>I have an API call that brings an array of CustomDescription. Each element of this array has a name, so, I created the following:</p>
  <ol>
  <li>A string array named namArray</li>
  <li>A for loop that runs my CustomDescription array, and append it's elements to namArray.</li>
  </ol>
  <p>My problem comes when I print my namArray after my for loop, and it just shows one element inside the array, it doesn't append the elements corresponding to the calls.</p>
  <p>Here is my code:</p>
  <pre><code>func getTypes(typesUrl: String, handler: @escaping([CustomDescription]) -&gt; Void) {
      
      AF.request(typesUrl).validate().responseTypes { (types) in
          
          guard let typeData = types.value,
                let typeNames = typeData.names else { return }
          
          var namArray = [String]()
          
          for name in typeNames {
              
              guard let types = name.name else { return }
              
              if name.language?.name == &quot;es&quot; {
                  namArray.append(types)
              }
          }
          
          print(namArray)
          handler(typeNames)
      }
  }
  </code></pre>
  <p>And my console logs the following:</p>
  <pre><code>You've got 94 species successfully
  [&quot;Planta&quot;]
  [&quot;Veneno&quot;]
  </code></pre>
  <p>I want to get [&quot;Planta&quot;, &quot;Veneno&quot;] instead, but can't figure out how.</p>