Sometimes it happens that the data is stored in two different tables but we want to run a for loop in Jinja which contains both the data from different databases.
So, sending two different lists won't work for us as the For-loop will then iterate the lists individually so in this case we have to send a list of dictionaries to jinja.
When I will use this
Suppose I am managing a class and I have two databases,
One has all the contact data like
name, address, Phone Number, etc.
And the Other one has data about how many times a particular student was absent.
The common column between two tables is the UID which is unique for every student
Top comments (0)