这是我从URL解析的JSON。现在,我需要此JSON中的student_id
,first_name
和second_name
。我该怎么办?
[{
"timestamp": "2017-06-29 05:37:23",
"student_id": "6",
"first_name": "SACHIN",
"second_name": "SINGH",
"sex": "male",
"student_course": "TECH-NON-TECH",
"email_id": "sachinsinghchahar9058841073@gmail.com",
"password": "kbmss@10002",
"phone": "8879505608",
"login_id": "kbmss",
"status": "2",
"roll_no": "",
"payment": "cash",
"amount_description": "cash",
"amount": "8500",
"refrence_id": "",
"child_id": "0",
"plan": "advance",
"valid_upto": "2017-12-14"
}]
答案 0 :(得分:0)
switch response.result{
case .success(let data) :
let json = JSON(data)
有关更多说明,您可以转到此链接。
How to get values of an array of dictionary from alamofire response using swift3