How to access value of __nssingleobjectarrayi in the following code
问题 I parsed a json and got a JSON Dictionary. { data = ( { bio = "<null>"; bookmarked = 35; id = 22; "last_seen" = { date = "2017-03-30 14:00:01"; timezone = "Asia/Kolkata"; "timezone_type" = 3; }; name = "Alex"; username = "Alex"; } );} I am trying to access username and date. I tried it doing let name = userData.value(forKeyPath: "data.username") print(username) By printing this, I am getting a __NSSingleObjectArrayI with the username. Optional(<__NSSingleObjectArrayI 0x6080000120b0>( Alex ) )