gpt4 book ai didi

ios - 相同键的 NSDictionary 数组

转载 作者:行者123 更新时间:2023-11-29 02:48:04 24 4
gpt4 key购买 nike

我正在请求 SOAP Webservice 并将响应解析为 NSDictionary。 XML 响应有多个唯一键。这是一个例子(已经在字典上解析):

"typ:partits" =             {
"typ:dadesPartit" = {
"typ:aforament" = 1;
"typ:codiEsdeveniment" = 2;
"typ:competicio" = GAMPER;
"typ:dataHoraConfirmada" = false;
"typ:dataPartit" = "08/18/14";
"typ:descripcioPartit" = "FCBARCELONA - CLUB LEON F.C.";
"typ:horaPartit" = "9:30:00 PM";
"typ:jornada" = 99;
"typ:partitActiuMenor" = true;
"typ:temporada" = "2014-2015";
"typ:tipusEsdeveniment" = 0;
},
"typ:dadesPartit" = {
"typ:aforament" = 1;
"typ:codiEsdeveniment" = 2;
"typ:competicio" = GAMPER;
"typ:dataHoraConfirmada" = false;
"typ:dataPartit" = "08/26/14";
"typ:descripcioPartit" = "FCBARCELONA - REAL MADRID";
"typ:horaPartit" = "9:30:00 PM";
"typ:jornada" = 101;
"typ:partitActiuMenor" = true;
"typ:temporada" = "2014-2015";
"typ:tipusEsdeveniment" = 0;
};
};

我如何遍历这些键?它们是相同的 :( ...

我尝试使用“allObjects”,但当我只收到一个“typ:dadesPartit”对象时,它会将其视为一个array 而不是NSDictionary

最佳答案

它返回一种类型,因为你的两个键是相同的,尝试将键重命名为单独的名称,当您键入 allKeys 时,将出现与这些键关联的值

关于ios - 相同键的 NSDictionary 数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24860839/

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