I have a code snippet that is suppose to print array object to log but not working wondering if someone could help. I am trying to get the subscriptionExpirationDate and item
What works
const onSessionConnect = (event) => {
if (event.purchaseState == 'PURCHASED') {
console.log('plan list is found here ', event.PurchaseState);
}
Console prints Purchased
What Does not work
const onSessionConnect = (event) => {
if (event.purchaseState == 'PURCHASED') {
console.log('plan list is found here ', event.purchases.skuIdentifier);
}
console prints Undefined
Could someone explain how to get the other objects to print in the console
Here is the array
{
purchases: [{
skuIdentifier: '199_1m_1w0',
subscriptionExpirationDate: '2020-11-15T06:12:57Z',
purchaseSource: 'USER',
transactionIdentifier: 'BPS-74511616-4E51-42F7-A528-DE15A8FF0279'
}],
purchaseState: 'PURCHASED'
}

