updated JSON exporting for ES