String to array?

Hey, I’m fetching this data right here off this url: https://btc-e.com/api/2/btc_usd/ticker, using the WWW class

And as you can see, it is a string, with different key:value pairings.

So in Unity, how do I turn that string into some sort of hashtable/array/dictionary thingy? (I don’t really know the difference between the 3, but whichever has the text keys with values assigned to the key)

I’m having some serious brainfog being that I haven’t coded anything in like a year. Thanks

I believe the string on that URL is in “JSON” format, whatever that means.

I’m reading that eval() might somehow be involved in this, can anyone post me an example? Thanks

first, split by , so you get pairs like “avg”:516.244995
then split by : so you get 2 strings “avg” and “516.244995”
then parse the second one, and add it to a dictionary, with the first one as key

you could probably start by splitting by { and } to trim the start and end off