My scenario is where i will upload a text file contain data like this
a1,b1,,c1,d1,
a2,b2,,c2,d2,
From the data, i able read and split it with ("\n") and result is
array=[array[0]:[a1,b1,,c1,d1]
array[1]:[a2,b2,,c2,d2]]
How can i populate the array above into my array object?
sample output:
newarray=[[name="a1",age:"b2",address="",contact="c1",gender="d1"],
[name="a2",age:"b2",address="",contact="c2",gender="d2"]]