gpt4 book ai didi

json - 如何使用 alamofire 或 swift json 将 JSON 数组解析为 Swift 4 中的数组

转载 作者:行者123 更新时间:2023-11-28 07:53:30 25 4
gpt4 key购买 nike

<分区>

我需要在下面的 json 中获取所有“students_id”值并将其存储在数组中。请告诉我执行此操作的有效方法。请帮助。谢谢

 {
"status": "success",
"user": [
{
"student_id": 1,
"first_name": "Student 1",
"last_name": "Student 1",
"emergency_contact_person": null,
"dob": "0000-00-00",
"class_section_id": 1,
"class_section_name": "A",
"class_id": 1,
"class_name": "10th"
},
{
"student_id": 2,
"first_name": "Student 2",
"last_name": "Student 2",
"emergency_contact_person": null,
"dob": "0000-00-00",
"class_section_id": 1,
"class_section_name": "A",
"class_id": 1,
"class_name": "10th"
}
],
"response": 200
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com