obj-c --NSMutableDictionary 存取字
NSMutableDictionary *d = [NSMutableDictionary dictionary]; [d setObject:@"qingjoin" forKey:@"serveraddr"]; [d setObject:@"pwdpwd" forKey:@"userpwd"]; NSLog(@"%@",d); //新建一个对象。 id ontest = [d objectForKey:@"serveraddr"]; id sectest = [d objectForKey:@"userpwd"]; NSLog(@"%@",ontest); NSLog(@"%@",sectest);
结果: serveraddr = qingjoin; userpwd = pwdpwd; qingjoin pwdpwd