views:

31

answers:

1

hi all

i want to save nssarray object into string. code is

for (NSMutableDictionary *dictionary in blogEntries)
{ 
    NSArray *titlearray = [dictionary objectForKey:@"title"];

    // know i want to store the object in titlearray into string how shoud i
    nsstring *STemp=? how should i write
    NSRange titleResultsRange=[sTemp rangeOfString:searchText options:NSCaseInsensitiveSearch];

    if(titleResultsRange.length>0)
    {
        NSDictionary *titlearrayDic=[NSDictionary  dictionaryWithObject:titlearray forKey:@"title"];
        [storeAll addEntriesFromDictionary:titlearrayDic];
        [listOfItems addObject:[storeAll copy]];
    }
}

thanks in advance

+1  A: 

I am not sure if understood the question correctly but in principle it should be possible to do like this:

NSMutableString sb = [[NSMutableString alloc] init];
for (NSString* word in titlearray)
  [sb appendWithFormat:word];
Anders K.