Ios Swift Alamofire将数据获取为相等

Ios Swift Alamofire将数据获取为相等,ios,json,swift,alamofire,Ios,Json,Swift,Alamofire,Hi Im使用Alamofire获取json数据,如下所示: { "prices": [ { "id": 1, "value": 1.327, "stationId": 24, "type": 0, "score": 5 }, { "id": 2, "value": 1.319, "stationId": 25, "type": 0, "score": 4 },...], "stations": [ { "id": 24,

Hi Im使用Alamofire获取json数据,如下所示:

{
     "prices": [
{
  "id": 1,
  "value": 1.327,
  "stationId": 24,
  "type": 0,
  "score": 5
},
{
  "id": 2,
  "value": 1.319,
  "stationId": 25,
  "type": 0,
  "score": 4
},...],

      "stations": [
{
  "id": 24,
  "name": "...",
  "address": "...",
  "brandId": 1,
  "location": ".."
},
{
  "id": 25,
  "name": "..",
  "address": "..",
  "brandId": 1,
  "location": ".."
},..],

         "brands": [
{
  "id": 6,
  "name": "AGIP"
},
{
  "id": 2,
  "name": "EKO"
}, ...]
如何获取“类型”为0的所有数据


然后,当从prices stations和brands获取所有类型为compare id的数据并放入数组或字典时,您可以使用此pod映射您的响应,然后您可以使用
对该对象进行过滤,以进行循环