convert string into array object javascropt code example
Example: convert array of string to array of objects javascript
myArray = myArray.map((str, index) => ({ value: str, id: index + 1 }));
myArray = myArray.map((str, index) => ({ value: str, id: index + 1 }));