Could not cast value of type '__NSArrayI' (0x10df73c08) to 'NSDictionary' (0x10df74108)
Your response is of Array
of Dictionary
not Dictionary
, so if you want all the dictionary you can access it using loop.
if let array = response.result.value as? [[String: Any]] { //If you want array of task id you can try like let taskArray = array.flatMap { $0["task_id"] as? String } print(taskArray)}