Use fieldnames(x) , where x is either an instance of a complex type that interests you, or a DataType . That is, fieldnames(today()) and fieldnames(Date) will have the same output. This returns a Vector{Symbol} list of field names in order.
To get values ββin any of these fields, use either getfield(x, field_name_here) or the syntax of the x.field_name_here shortcut.
Another useful and related function to play with is dump(x) .
I'm sure I saw another question, which is a pretty close duplicate of this in StackOverflow, but a quick search showed nothing. If anyone knows this, add it in the comments.
source share