You can also create a variant object: type Person = object name: string age: Natural MyValueKind = enum mvkNumber mvkString mvkPerson MyValue = object case kind: MyValueKind of mvkNumber: numberVal: float of mvkString: stringVal: string of mvkPerson: personVal: Person var tab: Table[string, MyValue] tab["a"] = MyValue(kind: mvkNumber, numberVal: 42) tab["jake"] = ΜyValue(kind: mvkPerson, personVal: Person(name: "Jake", age: 21)) Run
- Beginner - Is there a Nim's similar to a Python dictionary? Levlan
- Beginner - Is there a Nim's similar to a Python dictio... juancarlospaco
- Beginner - Is there a Nim's similar to a Python di... Levlan
- Beginner - Is there a Nim's similar to a Pytho... lqdev
- Beginner - Is there a Nim's similar to a P... lscrd
- Beginner - Is there a Nim's similar t... Vindaar
- Beginner - Is there a Nim's simil... Yardanico
- Beginner - Is there a Nim's s... lscrd
- Beginner - Is there a Nim's s... ShalokShalom
- Beginner - Is there a Nim's s... juancarlospaco
- Beginner - Is there a Nim's s... Vindaar