For turning json into csv