ios - Values in a sub JSON array to an NSString -
from web service, json response looks this.
{ data = { category = "barclays premier leaguejk"; "download_counter" = 1; id = 2; rating = 5; tags = ( "primera a", "primeira liga" ); title = "carles puyol"; }; status = 1; }
using [data valueforkeypath:@"tags"]
, have taken out sub array.
( "primera a", "primeira liga" )
i need values inside nsstring
. there simple way that?
nsarray *array =[data valueforkeypath:@"tags"]; nsstring *requiredstring = [nsstring stringwithformat:@"%@",[array componentsjoinedbystring:@" "]];
Comments
Post a Comment