I have printed the value that I want to get and is like this:
a = Optional(<__NSArrayM 0x1704494b0>(9))
How can I extract the value 9?
I wrote this but is wrong: let a = (parseJSON[index] as AnyObject).object(forKey: "subjects_count")
Try this:-
guard let a = (parseJSON[index] as AnyObject).object(forKey: "subjects_count"), let value = a.first else {return}
let stringValue = String(value)
print(stringValue)