Mappings: Fix Get field mapping api with pretty flag

Closes #6552