import tables
type
InnerTable = Table[string, string]
NestedTable = Table[int, InnerTable]
func newNestedTable(): NestedTable = initTable[int, InnerTable]()
func newEmptyInnerTable(): InnerTable = initTable[string, string]()
func `[]`(self: var NestedTable, key: int): var InnerTable =
self.mgetOrPut(key, newEmptyInnerTable())
var
nestT = newNestedTable()
nestT[0]["a"] = "b"
echo nestT