title: How to output plist items into an array
body: <p>I'm trying to output the results from the following plist where checked is 1 (checked is a BOOL from the plist). The issue I'm having is that when I try to output the text into a providersArray it outputs them one after another and not in one array like "text1,text2,text3," etc...</p>
  
  <p>My syntax is causing me the problem. any help would be great.</p>
  
  <pre><code>NSString *path = [[NSBundle mainBundle] pathForResource:@"Providers" ofType:@"plist"];
  dataArray = [NSMutableArray arrayWithContentsOfFile:path];
  for (NSDictionary *dictionary in dataArray)
  {
      text = [dictionary valueForKey:@"text"];
      checked = [dictionary valueForKey:@"checked"];
      NSLog(@"%@ checked value is: %@", text, checked);
  
  
      if ([checked boolValue]) {
          NSString *providers = [NSString stringWithFormat:@"%@",text ];
          NSLog(@"providers are %@", providers);
  
         NSArray *providersArray = [text componentsSeparatedByString:@","];
  
        NSLog(@"providersArray are %@", providersArray);
  
  
      }
  
  }
  </code></pre>