Added option to convert objects to arrays when exporting to JSON