ios - get value from nested dictionary (from plist file) in swift 2.2 -
i facing problem values plist file. want data of 2 marked red rectangles. flow of :
i can 3 key values root dictionary, want go marked rectangle of
testablesummaries
which array.than has dictionary
test
and on.
currently can values of
testablesummaries
the code use given below:
var componentarray: [anyobject] var mydict: nsdictionary? if let path = nsbundle.mainbundle().pathforresource("test", oftype: "plist") { mydict = nsdictionary(contentsoffile: path) } if let dict = mydict { var val = dict.valueforkeypath("testablesummaries")! print(val) }
but can't go deep of testablesummaries. in advance.
Comments
Post a Comment