Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle JSON object #98

Open
ESA14 opened this issue May 31, 2015 · 1 comment
Open

How to handle JSON object #98

ESA14 opened this issue May 31, 2015 · 1 comment

Comments

@ESA14
Copy link

ESA14 commented May 31, 2015

I have a few in-app purchases in my app.
How can I check which of this purchases a user owns?
I think I must get the productid from the JSON object, but how?
I tried:
inappbilling.getPurchases(successHandler, fail);

function successHandler (result) {
strResult = JSON.parse(result);
alert(strResult.productId);
}

This doesn't work.

Please help me.

@srthakkar
Copy link

Hey ESA14,

Use JSON.stringify(result) instead of JSON.parse(result).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants