Here is a situation where I need to upload a text file that contains data in the following format:
a1,b1,,c1,d1,
a2,b2,,c2,d2,
After reading and splitting the data with ("\n"), it results in an array like this:
array=[array[0]:[a1,b1,,c1,d1]
array[1]:[a2,b2,,c2,d2]]
I am looking for a way to populate the above array into my array object.
For example, the desired output would be:
newarray=[[name="a1",age:"b2",address="",contact="c1",gender="d1"],
[name="a2",age:"b2",address="",contact="c2",gender="d2"]]