This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseObject options:0 error:&error];//response object is your response from server as NSData | |
if ([json isKindOfClass:[NSDictionary class]]){ //Added instrospection as suggested in comment. | |
NSArray *yourStaffDictionaryArray = json[@"directory"]; | |
if ([yourStaffDictionaryArray isKindOfClass:[NSArray class]]){//Added instrospection as suggested in comment. | |
for (NSDictionary *dictionary in yourStaffDictionaryArray) { | |
Staff *staff = [[Staff alloc] init]; | |
staff.id = [[dictionary objectForKey:@"id"] integerValue]; | |
staff.fname = [dictionary objectForKey:@"fName"]; | |
staff.lname = [dictionary objectForKey:@"lName"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(“#header”).load(“header.html”); | |
$(“#footer”).load(“footer.html”); | |
</script> | |
<script src="//code.jquery.com/jquery-1.10.2.js"></script> | |
<script>$(“#footer”).load(“footer.html”);</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NSString *string1 = _textField1.text; | |
// NSString *string2 = _textField2.text; | |
// NSLog(@"contents are: %@, %@", string1,string2); | |
//[NSString stringWithFormat:@"%@%@", string1, string2]; |