Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

How to retrieve the variables in a template

Open
#1,039 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
30/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
backend

Research direction

The issue names no file, test, or entry point. Start by checking Jinjava's existing documentation and template APIs for a way to enumerate variables from the supplied template, including variables used only inside conditional branches. Done means documenting a working example that retrieves name, score, test_name, and max_score, or clearly recording that the capability is unavailable.

Written by the indexing model from the issue text.

Description

Hi,

Sorry to ask here but I cannot find any example showing how to retrieve all the variables inside a template...
For instance with the following template:

Hello {{ name }}!

{% if score > 80 %}
I'm happy to inform you that you did very well on today's {{ test_name }}.
{% else %}
I'm sorry to inform you that you did not do so well on today's {{ test_name }}.
{% endif %}
You reached {{ score }} out of {{ max_score }} points.

I want to (name, score, test_name, max_score)

Thanks

Dominant language
Java
Stars
785
Forks
184
Avg merge
6d 22h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HubSpot/jinjava

All issues in HubSpot/jinjava

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.