How to convert NSCFString to an Array

Viewed 30

This is what I received from userInfo,

AnyHashable("data"): [
  { "number": "1", name: "one" }, 
  { "number": "2", name: "two" }
]

This is what I can get using userInfo["data"]

[
  { "number": "1", name: "one" }, 
  { "number": "2", name: "two" }
]

But when I print the type it says NSCFString so I want to convert it to an array so I can loop through it.

I'm new to Swift so an explanation would be very much appreciated. thank you!

0 Answers
Related