Open chadhumphrey opened 8 years ago
@jwd2a may be able to clarify a bit, but I think you need to be parsing the result:
try {
resObj = JSON.parse(res);
} catch (e) {
// FUUUUUUUUUU...
}
Maybe this will help somebody, or not... ;)
But I got what I needed using the inspect package.
var util = require('util');`
amazon.getItemsInBrowseNode({
BrowseNode: 1234566
}, function(err, res){
var t = util.inspect(res.ItemLookupResponse.Items.Item.DetailPageURL, false, null);
console.log('this is T' + t);
});
Greetings, I'm using your amz-products and I'm new to Node.js. I'm able to get the app up and running, however I'm banging my head on how parse the json object (returned from amazon). I have done it plenty of times in php / javascript. Don't know why any node.js is giving me such a headache. Any chance you good throw out an example in "do something with the response here". This seems to work but this is as far as I can get.
console.log(JSON.stringify(res,null,2));
Thanks in advance.