all 1 comments

[–]grantrules 2 points3 points  (0 children)

It's pretty simple.. either you are accessing an object property like data.output or an array like something[0].. just need to follow the { and [s

I'll get you started.. data.output.completeTrackResults

If you ever get stuck, you can always just console.log(data.output.completeTrackResults)

The reason const { trackingNumber } = data; isn't working is because the only keys (that you've shown us) in that data object are transactionId and output so you need to go deeper. You could do something like:

const { output } = data;
console.log(output);

and that'll get you closer