[Plugin] Hash table

From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • sagispin

    I am not sure it is a bug, or a "feature". Official dictionary object has the same issue (sample capx).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Update:

    Add condition: for each. expression: CurKey, CurValue

    For example, hash table =

    { 
     "a":{ 
           "b":1, 
           "c":2 
         },  
     "d":3 
    }[/code:1d8cjctk] 
     
    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:

    { 
    "a":{ 
           "b":1, 
           "c":2 
         },  
    "d":3 
    }[/code:1d8cjctk] 
     
    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
Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)