title: How do I output a certain array?
body: <p>Objective C language--></p>
  
  <p>I have cvs file, i want to read it into a NSString and create arrays i.e.:</p>
  
  <p>Name, State, Price, Zipcode</p>
  
  <p>John, WI, 20000, 43555
  ..
  ..</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import &lt;string.h&gt;
  int main(int argc, const char * argv[])
  
  {
  @autoreleasepool {
      //input user for a name on property list    
      int input;
  NSLog(@"The worldcities.cvs contained infor on property names.");       
          NSLog(@"Enter a name: ");       
          scanf("%i", &amp;input);
  
  NSString *sourceFileString = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"filename" ofType:@"worldcities.csv"] encoding:NSUTF8StringEncoding error:nil];
  
          NSMutableArray *csvArray = [[NSMutableArray alloc] init];
          csvArray = [[sourceFileString componentsSeparatedByString:@"\n"] mutableCopy];
  
          NSString *keysString = [csvArray objectAtIndex:0];
  
          NSArray *keysArray = [keysString componentsSeparatedByString:@","];
  
          [csvArray removeObjectAtIndex:0];
  </code></pre>
  
  <p>I want to to be able to output a property name based on user input from the create array from the .cvs file, how would i proceed?</p>