I have a list of strings in k:v format as follows:
List<String> data = new ArrayList();
data[0] = "acctHolderName:null,auctEndDt:2021-04-23,auctTitle:2 X BUCKLE RACING SEAT BELT HARNESS,bankName:null,buyerId:22494074,byrCntryId:1,cardlastFourDigits:1234,checkoutStatus:2,cityShipAddr:null,ckCompleteDate:2021-04-04 08:06:27,cnvstnIdList:null,countryShipAddr:null,createdTime:2021-04-04 08:06:27,firstTrackingDtlId:17824011,gmvBuyerLcAmt:59.990000000,gmvSellerLcAmt:59.9900000000000000,gmvUsdAmt:59.9900000000000000,instrumentType:null,itemId:4966893,itemPrice:59.99,itemSiteId:100,nonPciAccountId:null,omsExternalRfrncId:17-06848-86625,omsOrderId:170000684886625,orderStsId:0,paidDate:2021-04-04 08:06:27,paymentMethod:[34],"
data[1] = "acctHolderName:null,auctEndDt:2021-04-22,auctTitle:2 X BELT,bankName:null,buyerId:22491011,byrCntryId:2,cardlastFourDigits:5678,checkoutStatus:2,cityShipAddr:null,ckCompleteDate:2020-05-04 08:06:26,cnvstnIdList:null,countryShipAddr:null,createdTime:2020-05-04 08:06:27,firstTrackingDtlId:17834022,gmvBuyerLcAmt:59.990000000,gmvSellerLcAmt:59.9900000000000000,gmvUsdAmt:59.9900000000000000,instrumentType:null,itemId:4955893,itemPrice:59.99,itemSiteId:101,nonPciAccountId:null,omsExternalRfrncId:17-06848-86625,omsOrderId:170000684886625,orderStsId:0,paidDate:2021-03-04 08:06:27,paymentMethod:[34],"
How can I write to csv using opencsv CSVWriter where before colon is a column name and after it a value.
So for example in above case: acctHolderName:null, acctHolderName is a column name and null is its value.