How to create objects from SwiftyJSON

后端 未结 4 1143
面向向阳花
面向向阳花 2021-02-19 06:23

I have a code, that parses JSON\'s list of questions and I can get every property. How can I iterate through the whole file and for each question create an object ?

<         


        
4条回答
  •  说谎
    说谎 (楼主)
    2021-02-19 06:54

    for (item, content) in hoge {
        let level = content["level"].intValue
    }
    

    that should work

提交回复
热议问题