Convert text of the Dictionary

Get help using Construct 2

Post » Fri Oct 03, 2014 3:01 pm

How i can convert the text of the Dictionary to a readable text.
For example, my script is generating a Dictionary like this:

{"c2dictionary":true,"data":{"3102014165424":"testing","3102014165728":"testing again"}}

And i need convert to something like this:

3102014165424
testing

3102014165728
testing again


Thanks!
B
6
Posts: 46
Reputation: 342

Post » Fri Oct 03, 2014 3:09 pm

Also, the Key values are a timestamp, so i don't know how to obtain and list the whole Dictionary filtered into a readable text.

Any help please?
Thanks in advanced!
B
6
Posts: 46
Reputation: 342

Post » Fri Oct 03, 2014 3:50 pm

What exactly are you looking for, a way to parse the JSON out of Construct or a Construct way of reading all your values ?
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Fri Oct 03, 2014 3:57 pm

A way to parse in-app
B
6
Posts: 46
Reputation: 342

Post » Fri Oct 03, 2014 4:05 pm

This should help you.

You first load the Dictionnary with the JSON, then you simply iterate through each key and display them along with the stored value.
You do not have the required permissions to view the files attached to this post.
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Fri Oct 03, 2014 4:31 pm

OMG!
I love you!

Thanks so much, you help me a lot with this elegant solution ;)
B
6
Posts: 46
Reputation: 342


Return to How do I....?

Who is online

Users browsing this forum: evillair and 59 guests