title: How to initialize array in objective-c
body: <p>Very basic question :)</p>
  
  <p>I have to initialize an array in objective-c. I will further use that array value in table view. I have a listing of chapters and I have written it as hardcoded like below.</p>
  
  <pre><code>    NSArray *tableList;
  
  tableList = [[NSArray alloc]initWithObjects:@"Chapter 1",@"Chapter 2",@"Chapter 3",@"Chapter 4",@"Chapter 5",nil];
  </code></pre>
  
  <p>But now I have a indexed array which is keeping chapters details. below is the code of array which is holding value.</p>
  
  <pre><code> extern NSArray *wallvalue;
  
      for (NSDictionary *chapter in wallvalue) {
          NSString *chapterName = [person objectForKey:@"chapters"];
          if([chapterName length] &gt;0)
          {
  
              NSLog(chapterName);
          }
      }
  </code></pre>
  
  <p>Now I want to show these chapterName in my tablelist. How will I do this ?</p>
  
  <p>Thanks in advance.</p>