hello I have a NSMutableArray iconlocarr. I also have another array containing dictionary data called xmlnodes which looks like this:
{
nodeChildArray = (
{
nodeContent = "http://www.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png";
}
);
nodeName = weatherIconUrl;
}
I am trying to add the nodeContent data (icon url) into my iconlocarr array:
[iconlocarr addObject:[[[xmlnodes objectAtIndex:i] objectForKey:@"nodeChildArray"] valueForKey:@"nodeContent"]];
The problem I have is that the above code adds the following data:
(
{
nodeContent = "http://www.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png";
}
)
As well the data I actually want
"http://www.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png"
How do I just add the nodeContents data and not the rest? The intention is to pass the data to a NSURL
Try this instead:
which consider object “nodeChildArray” as an array, then extract index 0 and then the returned dictionary will contain the “nodeContent”.