我不明白如何从字典数组,我曾尝试在此代码,但我希望得到阵列只有内容和类型如何从字典数组中迅速3
这是我的数组
{
wsResponse = {
aarti =(
{
content = "";
identifier = "slok_one";
title = 1;
type = "\U092d\U0915\U094d\U0924\U093e\U092e\U0930";
},
{
content = "";
identifier = "slok_two";
title = 2;
type = "\U092d\U0915\U094d\U0924\U093e\U092e\U0930";
},
{
content = "";
identifier = "slok_three";
title = 3;
type = "\U092d\U0915\U094d\U0924\U093e\U092e\U0930";
}
}
);
};
这里是我的代码
Alamofire.request(url, method: .get, parameters: nil, encoding: JSONEncoding.default)
.responseJSON { response in
if let status = response.response?.statusCode {
switch(status){
case 201:
print("example success")
default:
print("error with response status: \(status)")
}
}
//to get JSON return value
if let array = response.result.value
{
let JSON = array as! NSDictionary
print("\(JSON)")
let response = JSON["wsResponse"] as! NSDictionary
let data = response["aarti"]
}
}
我想阵从此,像内容,名称,类型
预先感谢您
对不起它的字典,但我希望像数组内容,名称,类型我得到导致在正确的字典 – johnyDiOS
@EricAya **这是我的数组**不是结果它是我的真实数组,并且我想从这个 – johnyDiOS
数组当中得到数组内容! NSDictionary'非常非常混乱! – vadian