+2  A: 

First off, if you want to get the value of CustomerAddress.City, you will never get it. CustomerAddress is the type, not the property name. You want to get Address.City.

That said, your GetPropertyValue is not set up to do what you want.

Try splitting the name by the dots:

var propertyNames = property.split('.');

Now, you have a list of the property names {"Address", "City"}

Then, you can loop through these property names, one by one, calling GetPropertyValue recursively.

That should do it :)

Brian Genisio
Thanks that solved the problem, I didn't think of recursion.
JeremySpouken