` import typetraits type Person = object name: string age: int city: string var 
p: Person # Using fieldPairs echo "Using fieldPairs:" for name, value in 
p.fieldPairs: echo "Field name: ", name echo "Field type: ", value.typeof echo 
"---" `

Run

Reply via email to