Exploring the world of TypeScript and seeking assistance with a query.
I currently have an object structured as follows:
public storeID: number,
public storeName: string,
public storeBio: string,
public storeCoverImage: string,
public storeLogo: string,
public storeGallery: string[],
public storeIsFeatured: boolean,
public storeAmenities: string[],
public storeContactInfo: {
// Contact information details here...
},
public storeConfig: {
allowRemoteSignup: boolean;
},
public userSuscriptions: [
{
userID: number;
availableCredit: number;
discounts: [
{
globalDiscount: number;
itemDiscount: [
{
itemID: number;
itemPrice: number;
}
];
}
];
}
],
public menuNotificationSuscriptions: number[],
public eventNotificationSuscriptions: number[]
My goal is to obtain a result where userSuscriptions.userID = 3
(which may include multiple entries).
I've attempted nested filters but haven't achieved success. Any suggestions or solutions are appreciated!