Given an infinitely nested object with unknown properties. What is the best approach to extract all the leaf value types (strings, ints, doubles and decimals).
Duplicate property names need to be retained.
Is there a good way to do this in C#.
Have tried expando and dynamic but it doesn't seem to work very well. The code quickly gets ridiculously complex. There must be a better way. I am thinking this must be a solved problem but I just can't seem to find a good example.