Use Array#map
to map one array to another:
const myObj = [{"id":1,"text":"Mary"},{"id":2,"text":"Nancy"},{"id":3,"text":"Paul"},{"id":4,"text":"Cheryl"},{"id":5,"text":"Frances"}];
const selectedIds = myObj.map(({ id }) => id);
console.log(selectedIds);