Q:

How to get key data from NSDictionary swift 4

I want to get the result from NSDictionary i get this NSDictionary from webservice now i want to get the result .
i need this valuse     "Your request is unsuccessfull. Please "
i tried this let ft = resultsm.value(forKeyPath: "Body.QR_FundTransferResponse.QR_FundTransferResult") as! String  but is store data and print the same value for all request  
let result:NSDictionary = dict! as NSDictionary 

The output is : 

  Body =     {
    "QR_FundTransferResponse" =         {
        "QR_FundTransferResult" = "Your request is unsuccessfull. 
       Please ";
          };
    };

A:

Assuming you've got this in a function and result is of type [String: Any] (e.g. a Dictionary):
guard let body = result["body"] as? [String: Any] else {
    // Failed to find body, return empty string
    return ""
}
guard let response = body["QR_FundTransferResponse"] as? [String: Any] else {
    return ""
}
guard let result = response["QR_FundTransferResult"] as? String else {
    return ""
}
// Now have "Your request is unsuccessful. Please "
return result

Recommend you check out Codable.

