AndroidInAppBilling
AndroidInAppBilling copied to clipboard
How to handle JSON object
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.
Hey ESA14,
Use JSON.stringify(result) instead of JSON.parse(result).