You won't find
an exact answer to your question. A lot of programming is about finding
a close-enough answer and adapting it to your requirements.
Use the Array.map method to map the elements in your array:
Array.prototype.map() - JavaScript | MDN[
^]
const authors1 = authors.map(author => ({
authorId: author.id,
}));