Example code:
type
Client = ref object of RootObj
name: string
user_id: int
var
users: seq[Client]
users.add( Client(name: "george", user_id: 1) )
for v in users:
echo v.name
For example, if I do echo v, I will get bombarded with errors. https://paste.sh/uMxS2pYq#it4jhO-XOandG88tYE4jq73P
However, I want to print all the properties of Client nicely. Any special method/proc that does this? Thanks in advance!
for v in users:
for name, value in fieldPairs(v[]):
echo(name, "=", value)