简体   繁体   English

我如何从此输出中获取电子邮件和密码值,该输出是iOS中Web服务的响应?

[英]How can i get email and password value from this output which is response from web service in iOS?

Since i convert webservice response into Json and assign into NSDictionary. 由于我将Web服务响应转换为Json并分配给NSDictionary。 When i print out the contents in dictionary then it gives the output below. 当我在字典中打印出内容时,它给出下面的输出。 My problem is How can i get email and password value from this output? 我的问题是如何从此输出中获取电子邮件和密码值?

Key is post, Value is 关键是发布,价值是

(
        {
        post =         {
            "active_flag" = Y;
            email = "g.amit@jasapp.com";
            "first_name" = amit;
            "last_name" = gupta;
            "member_id" = 17;
            password = amitgupta;
        };
    }
)
 NSMutableDictionary *temDict = [self.YourAarray objectAtIndex:0];  
 NSlog(@"%@",[temDict  objectForKey:@"email"]);
 NSlog(@"%@",[currentHighscore objectForKey:@"password"]);

For example, if the NSDictionary you are creating from JSON is named jsonDict , the following code should work: 例如,如果您要从JSON创建的NSDictionary名为jsonDict ,则以下代码应该起作用:

NSDictionary *post = [jsonDict objectForKey:@"post"];
NSString *email = [post objectForKey:@"email"];
NSString *password = [post objectForKey:@"password"];

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从我从Web服务获得的响应中获取确切的价值? - how to get the exact value out of the response i am getting from the web service? 为什么 Json 字典总是在 nsdata(Bytes) 中给出响应。如何从 Web 服务获取字典 - why Json Dictionary is Giving the response in nsdata(Bytes) always.How can i Get the Dictionary from web service 如何在直接来自Web服务解析的UIscrollView中显示图像? - how can i display image in UIscrollView which comes directly from parsing of web service? 如何使用 sharepoint web 服务验证 Sharepoint 的登录用户名和密码? - how to validate login username and password for Sharepoint using sharepoint web service from ios? IOS 4.3如何从Web服务中正确解析Json响应并将其绑定到UITABLEVIEW - IOS 4.3 How to properly Parse Json response from a Web-Service and bind it to UITABLEVIEW 如何调用从iOS应用程序在Python的ladon框架中开发的Web服务? - How to call web service which is developed in Python's ladon framework from iOS app? 如何在iOS中通过AddressBook与电子邮件联系? - How to get contacts with Email from AddressBook in iOS? 如何加快从Web服务加载图像的速度? - How can I speed up the loading of images from a web service? 如何从iPhone应用程序中将用户名和密码传递到Web服务? - How to pass username and password to a web service from within an iPhone app? 如何从 iphone 设备获取 email 历史记录..? - How can i get email history from iphone device..?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM