Dynamic data in post.MD?

I’m new to hugo and want to know if it’s possible to insert js or short code in a md file inside posts to call a API and render a ul>li based on the json array response.

So that on the generated static page user can get the latest data list on page load.

You can do it with Shortcodes. Create one with the needed JavaScript widget and add it to the posts where you want it.

If it’s something you want in e.g. the sidebar on every post it would be better to add it to the template file.