i want to send the json array from one view controller to another view controller and the array should be populated in pickerview . but i am unable to send the array . i am getting the array but not able to send it
let mydata = json["data"] as! NSArray
print("My Data is \(mydata)")
var sendData = [NSArray]()
sendData = mydata as! Array<NSArray>
self.performSegue(withIdentifier: "checkLoginViewController", sender: sendData)
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let destinationVC = segue.destination as? SignupViewController, let sendData = sender as? [String]{
destinationVC.dept = sendData
}
}
secondVC:
var dept = [String]()