[Plugin] Hash table

Post your completed addons to share with the community

Post » Tue Jun 13, 2017 1:30 pm

this is just my way of overcoming this potensial bug:

https://ibb.co/j0jmVv
B
41
S
16
G
7
Posts: 55
Reputation: 6,498

Post » Tue Jun 13, 2017 2:41 pm

@sagispin

I am not sure it is a bug, or a "feature". Official dictionary object has the same issue (sample capx).
B
109
S
27
G
276
Posts: 4,480
Reputation: 154,420

Post » Mon Jul 31, 2017 5:21 am

rexrainbow wrote:Update:

Add condition: for each. expression: CurKey, CurValue

For example, hash table =
Code: Select all
{
 "a":{
       "b":1,
       "c":2
     },
 "d":3
}


for each "a" will get
key = "b" , value = 1
key = "c" , value = 2

for each "" ("" is root) will get
key = "d" , value = 3
( There are two keys "a" and "d" in root, but value at key "a" is not a number or string, only get key "d")rexrainbow2012-04-16 01:08:18


Hi Rex Very nice,

A little unnatural that root doesn't return all though

Couldn't you make it recursive to give all elements. For instance, using your example:

Code: Select all
{
"a":{
       "b":1,
       "c":2
     },
"d":3
}



for each "" ("" is root) will get
key = "a" , value = (has children or not int, not string) then for each "a"
key = "b" , value = 1
key = "c" , value = 2
key = "d" , value = 3

I don't know if that's helpful or if that's something you were going for
it's just how i think those structures should be returned
B
3
Posts: 1
Reputation: 179

Previous

Return to Completed Addons

Who is online

Users browsing this forum: inkfalcon and 4 guests