Answer the question
In order to leave comments, you need to log in
How to render nested objects from MongoDB with Backbone\Underscore?
Such a question:
Flask + MongoDB is used on the backend. For one of the URLs, I return a collection of objects that contain links to other objects.
As a result, when I try to render objects in the template in this way:
<% _.each(users.toArray(), function(user, key, list) { %>
<tr>
<td><%- user.get('first_name') %></td>
<td><%- user.get('last_name') %></td>
<td><%- user.get('login') %></td>
<td><%- user.get('email') %></td>
<td><%- user.get('books') %></td>
<td><%- user.get('friends') %></td>
</tr>
<% }) %>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question