flatten data format