Check out example codes for "typescript map list to new list of objects". It will help you in understanding the concepts better.

Code Example 1

var result = arr.map(person => ({ value: person.id, text: person.name }));
console.log(result)

Learn ReactJs, React Native from akashmittal.com