I got this data from my server using JSON:
{
ID = 198;
dtDate = "2012-03-14 00:00:00";
dtTime = "06:00:00";
iPublished = 1;
sProgram = "Devotional Hits";
}
{
ID = 199;
dtDate = "2012-03-14 00:00:00";
dtTime = "07:00:00";
iPublished = 1;
sProgram = "Old Malayalam Hits";
}
{
ID = 200;
dtDate = "2012-03-14 00:00:00";
dtTime = "08:00:00";
iPublished = 1;
sProgram = "Malayalam New Hits";
}
{
ID = 201;
dtDate = "2012-03-14 00:00:00";
dtTime = "09:00:00";
iPublished = 1;
sProgram = "Melody Songs";
}
{
ID = 202;
dtDate = "2012-03-14 00:00:00";
dtTime = "10:00:00";
iPublished = 1;
sProgram = "Jayachandran Hits";
}
{
ID = 203;
dtDate = "2012-03-14 00:00:00";
dtTime = "11:00:00";
iPublished = 1;
sProgram = "Yesudas Hits";
}
{
ID = 204;
dtDate = "2012-03-14 00:00:00";
dtTime = "12:00:00";
iPublished = 1;
sProgram = "Ilayaraja Hits";
}
I need to split this data and store sProgram data into an array.. need help.
I need to split this format and I want sProgram and dtTime separately. What should I do for that. I’m a little bit confused about string formatting.
If you are using < IOS 5, add SBJSON to your project