这是我在webservice上的json回复,
ChangedOptions = ( { Descriptions = ( "some text" ); Invoice = 0; MSRP = 0; OptionCode = "some text"; OptionGroup = "some text"; OptionSection = Packages; State = Selected; }, { Descriptions = ( "some text" ); Invoice = 50; MSRP = 50; OptionCode = "some text"; OptionGroup = "some text"; OptionSection = Packages; State = Unselected; }, { Descriptions = ( "some text" ); Invoice = 0; MSRP = 0; OptionCode = 28F; OptionGroup = "some text"; OptionSection = Packages; State = Required; }, { Descriptions = ( "some text" ); Invoice = 0; MSRP = 0; OptionCode = 27F; OptionGroup = "CPOS PKG"; OptionSection =PowerTrain; State = Excluded; },
}
我想使用OptionSection
来获取特定的数组索引ex:在此响应中我必须显示描述,发票,MSRP,OptionCode,OptionGroup即对应于“包”如果OptionSection =“Packages”是多个计数我必须在UITableView中显示所有这些内容
请对此提出任何建议
答案 0 :(得分:2)
您应首先了解如何在iPhone上使用JSON解析器。 这是一个很好的教程:http://mobileorchard.com/tutorial-json-over-http-on-the-iphone/