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 get information from Object #414

Open
carolabianchi opened this issue Oct 18, 2018 · 2 comments
Open

How to get information from Object #414

carolabianchi opened this issue Oct 18, 2018 · 2 comments

Comments

@carolabianchi
Copy link

Hi everybody!
I write you because I need to understand how can I get information from the object associated to a post.

The code is:

const author = "pippofranco";
const permlink = "il-segreto-per-il-successo";
steem.api.getContent(author, permlink, function(err, result) {
console.log(result);
});

The object related to the user is:

schermata 2018-10-18 alle 16 05 58

How can I extract the information about "category"?

I need your help for my degree...

Thank you in advance!!!!

@Jolly-Pirate
Copy link

console.log(result.category);

@carolabianchi
Copy link
Author

carolabianchi commented Oct 19, 2018

Thank you Jolly-Pirate!

If I need to extract the category of multiple posts as in the next lines of code, how can I proceed?
The code is:

for (var i = 0, len = vm.following.length; i < len; i++) {
steem.api.getDiscussionsByBlog({tag: vm.following[i].name, limit: 50}, function(err, result) {
if (result) {
console.log(result);
let postContainer = $('#result');
let metadato = JSON.parse(result[i].json_metadata);
postContainer.append( /* params */);
console.log(result[i].category);
}
})
}

The idea is to retrieve 50 posts of each user in the variable vm.following and for these posts I need to extract the category related to.
How can I do this? Any advice?

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