Indent any json file nested fields and make it flat

@Badger it worked perfectly! thanks a lot for the help. Last question please:
How can I keep/detect the data type for the fields in the processed json file using ruby?