I have the various number of input like that. I do not control the exact numbers of inputs as they are coming from backend
<input value="User"><input value="email@mail.com"><input value="Adress">
My task is to grab all values from inputs and put them into object. Object is look like that
contactDetails = {username, mail, adress}
So no matter how many inputs I have 3 input values assigning to object keys and if there another 3 inputs they go to separate object with the same key values so in the end it should look like that
{"username": "User","mail": "email@mail.com","adress": "Adress", }, {"username": "User 2","mail": "email@mail.com 2","adress": "Adress 2", },