2016-05-08 19 views
-2

我正在使用SOAPEngine框架連接到我的web服務,這是我想從我的結果字符串中檢索的結果GetResult =「True」; 你能幫忙嗎?我和斯威夫特的Xcode 7.3工作字符串中的快速代碼提取值

/* 
    Result ={ 
     Body =  { 
      GetResponse =   { 
       GetResult = "\"True\""; 
      }; 
     }; 
    } 
*/` 

感謝

+0

Eric,你好肯定是一本字典但我無法獲得GetResult =「True」; – user782187

+0

修復您的問題。 –

+0

「如何從字典中獲取價值」的問題的答案是閱讀Swift基礎知識文檔:https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/CollectionTypes.html#//apple_ref/doc/uid/TP40014097-CH8-ID113 – Moritz

回答

0

讓sonuclar =字典[ 「身體」]![ 「的GetResponse」]![ 「調用getResult」]