Added an as map method to get a flat list of fields and their type.