title: how to find array of index from textfield value in Xcode?
body: <p>i need to get values from mysql and display in Xcode  textfield dynamically.( want to automatically enter the string in lastName and phoneNumber when user enters the firstName)
  here my Xcode..</p>
  
  <pre><code>  NSError *err;
    NSString *strURL=[NSString stringWithFormat:@"http://192.168.1.22:81/priya/sam.php"];
    NSData *dataURL=[NSData dataWithContentsOfURL:[NSURL URLWithString:strURL]];
  
    NSString *name=firstname.text;
    NSDictionary *jsonArray = [NSJSONSerialization JSONObjectWithData:dataURL options:  NSJSONReadingMutableContainers error:&amp;err];
    NSArray *array=[jsonArray objectForKey:@"key"];
  
  
    lastname.text=[[array objectAtIndex:0]objectForKey:@"lastname"];
    phone.text=[[array objectAtIndex:0]objectForKey:@"phone"];
  </code></pre>
  
  <p>then how to find text array of index using first-name. 
     thanks in advance</p>