I might as well post my solution, which is also recursive and doesn’t use any external library:
namedtuple(d::Dict) = (; map(k -> Symbol(first(k)) => namedtuple(last(k)), collect(d))...)
namedtuple(x) = x
I might as well post my solution, which is also recursive and doesn’t use any external library:
namedtuple(d::Dict) = (; map(k -> Symbol(first(k)) => namedtuple(last(k)), collect(d))...)
namedtuple(x) = x