how can I pass the array data coming from api to one ViewController to another ViewController? : I'm new in iOS
I'm trying to pass my array data to another view controller through prepare segue to the another viewcontroller.


```Swift
class FirstVc {
var location = [Any]()
  self.clientrequest.request(url: "http://api.details.in/api/users/alllocation", method: .GET, completion: {
                    res , err in           

let decode = try! JSONDecoder().decode(SelectLocation.self, from:json)
                    
            self.location = decode.states
   //I'm getting all locations here
               print(self.location)

  })
}
   override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        
        if segue.destination is SecondVc
        {
            let vc = segue.destination as?  SecondVc
     //here I'm assigning the variable 
                vc?.mineSpillere2 = self.location
        }
    }

class SecondVc{
 @IBOutlet weak var selectState: UILabel!
    var mineSpillere2 = [Any]()
override func viewDidLoad() {
     selectState.text = mineSpillere2 as? String
    }    
}
```