Hello everyone,
I’m new to this way of coding, so please help.
I apologize in advance if there is such a topic, but I did not find it.
This is a multiple entry of persons into the records system.
A CSV document can contain over 20 people with data (name, surname, e-mail … etc.).
My question: is there a way (Script) to “pass a CSV document” by taking some increment / loop that will mark any information, for example by typing code instead, (E0,2 = $ {myCSV [0] [1]}}) → Ei, j = $ {myCSV [i] [j]}) where i and j would increase by 1.
I wonder because the number of people can change over a few days / months / years, so there is the possibility of updating because the accounts expire every few months, so I just have to update the CSV document only.
In CSV:
User1,John ,Smith,John.Smith@somecompany.com User2,Michael,Williams,Michael.Williams@somecompany.com
JSON:
> {
"Name": "test", "CreationDate": "2020-10-9", "Commands": [ { "Command": "open", "Target": "localhost", "Value": "" }, { "Command": "csvReadArray", "Target": "test.csv", "Value": "myCSV" }, { "Command": "echo", "Target": "E0,2=${myCSV[0][1]}", "Value": "firstname" }, { "Command": "type", "Target": "id=firstName", "Value": "${myCSV[0][1]}" }, { "Command": "echo", "Target": "E0,2=${myCSV[0][2]}", "Value": "lastName" }, { "Command": "type", "Target": "id=lastName", "Value": "${myCSV[0][2]}" }, { "Command": "echo", "Target": "E0,3=${myCSV[0][3]}", "Value": "email" }, { "Command": "type", "Target": "id=email", "Value": "${myCSV[0][3]}" }, ] }
Thank you in advance for your reply.