ios - cannot assign a value of type json to a value of type NSArray -


i trying send info segue following error cannot assign value of type json value of type nsarray

when try do:

self.pageimages = apiresult["images"] 

i have apiresult setup as:

var apiresult: json! = [] 

then i'm using alamofire swiftyjson in order fetch result , cast json, need nsarray.

my data returned as:

{     "somedata": {         info     },     "somedata": {         info..     },     "images": [        "url1", "url2", "url3"     ] } 

if apiresult json object returned swiftyjson , if apiresult["images"] array of urls want assign pageimages array variable, have use array property of json typed swiftyjson object:

self.pageimages = apiresult["images"].array 

Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -