example code
    
    
    type
      Person = object
        name: string
        age: int
        city: string
    
    # Loop over the fields of the Person type, but This does not work....
    for field in Person.fields:
      echo "Field name: ", field.name
      echo "Field type: ", field.type.name
      echo "---"
    
    
    Run
    
    
    Error: undeclared field: 'fields'
    
    
    Run

How can I make it work? 

Reply via email to