I have a project requirement.I am getting the data in text format as given below.
SL NO POLICY NO AMOUNT NAME CGST TAX
02 33051090 195.0 D BL ESSENTIAL 9.00%
03 33051091 195.1 D HRFL COD 9.00%
But I need to process text content and form json out of that.
[{
"SL NO":"02",
"POLICY NO":"33051090",
"AMOUNT":"195.0",
"NAME":"D BL ESSENTIAL",
"CGST TAX":"9.00%"
},
{
"SL NO":"03",
"POLICY NO":"33051091",
"AMOUNT":"195.1",
"NAME":"D HRFL COD",
"CGST TAX":"9.00%"
}]
I am unable to think of any logic as how to diffrentiate the values and map to json property as there are lot of whitespaces in between.
There is no unique separator between the contents I am getting.So It is not like CSV data.