hey ^^)/ just a question, is it possible to rename a key in an orderedtable 
while retaining the order?

here's what i tried first, 
    
    
    import tables
    
    var animals = {"cat": "woof", "cow": "moo", "opossum": 
"hisssss"}.toOrderedTable
    # i would like this order to stay
    
    var tmp: string
    discard animals.pop("cat", tmp)
    animals["dog"] = tmp
    
    echo $animals
    # however, order is now cow, opossum, dog instead of dog, cow, opossum
    
    
    Run

what i thought i could do is split at that key, add the new key name and then 
append the other half of the split... i don't know how i'd go about doing this 
though

any help / comments would be appreciated

Reply via email to