I have an array class called DocumentItemSelection with the syntax:
new Array<DocumentItemSelection>
. My goal is to extract only the documentNumber
class member and store it in another Array<string>
, while keeping the same order intact.
Is there a more efficient way to achieve this in Javascript/Typescript? Currently, I'm using a for/foreach loop.
export class DocumentItemSelection {
documentNumber: string;
documentDate: Date;
isCurrentOwnerFlag: boolean;
}