How to make a named tuple from a dictionary?

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
2 Likes