Likes on a post

That looks like JSON for the latest topic list page. The “liked” is whether or not you liked a post in the topic. (false if you read it but didn’t Like, null if you didn’t read it while logged in). The “like_count” is the number of likes for all the posts in the topic combined.

Depending on what kind of information you want, there may not be what you need in that JSON alone. More intricate criteria may need to run a query against more than one table. Or maybe XHR calls to other pages to get their JSON.

I’m guessing your interest is to be able to show Like counts on topic list pages? Or are you interested in analyzing statistics? If it’s more a general interest in the database, checking out the schemas near the bottom of model files can help:
discourse/app/models at main · discourse/discourse · GitHub

Or better, get familiar with the Data Explorer plugin:

1 Like