-4

I have a string that looks like this:

"[{"ImageTagID":78,"Xpixel":408,"Ypixel":69,"Xpercent":17,"Ypercent":68,"ImageID":45617}]"

How do i break it up to pieces?

Thanks,

David Rönnqvist
  • 55,638
  • 18
  • 162
  • 201
  • 2
    1. This has absolutely nothing to do with Xcode. 2. You haven't tried googling, which is bad. –  Apr 21 '13 at 06:52

1 Answers1

0

This is a dictionary. There are keys and values in a dictionary. If you need a particular value, you must get it using the key.

In iOS it is done this way,

int tagID = [yourdictionary objectForKey:@"ImageTagID"];

Hope this helps you start. If you have more questions, do ask me.

Splitting a string:

Example: NSArray *stringArray = [string componentsSeparatedByString: @","];

lakshmen
  • 27,102
  • 64
  • 169
  • 262
  • I wish it was a dictionary. It is a string. I logged its class and it's __NSCFString. I know i should get it as a dictionary from the WS but sadly i didn't. Is there a way to split a string? – user2295743 Apr 21 '13 at 07:07
  • updated again.. have a look... – lakshmen Apr 21 '13 at 07:09