Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9114403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:11:34+00:00 2026-06-17T04:11:34+00:00

I have this: Template.laps_t.laps = function () { return Practices.findOne({name: Session.get(‘practice’)}); }; What do

  • 0

I have this:

Template.laps_t.laps = function () {
  return Practices.findOne({name: Session.get('practice')});
};

What do I have to do to iterate over this and put the values in paragraphs? I mean:

{{#each laps.lapList}}
  <p>WHAT DO I HAVE TO PUT HERE TO PRINT THE VALUES OF THE LIST????</p>
{{/each}}

Am I doing this right? What do I have to put inside that paragraph?

EDIT:

Thanks Justin Case, your solution did the trick.

Now I have one more problem. I want to print no only lap.lapList but also lap.lapTimeList (which is another list like [1,2,3,4,5,...]) in a table like so:

{{#each laps.lapList}}
  <tr>
    <td>iterate over and print the current value of lapList (solved using {{this}})</td>
    <td>iterate over and print the current value of lapTimeList</td>
  </tr>
{{/each}}

laps is the object that holds both lapList and lapTimeList. So, the idea is to print the lap number and the respective time. Does anyone knows how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:11:35+00:00Added an answer on June 17, 2026 at 4:11 am

    If laps.lapList is an array in the form of [1,2,3] then:

    {{#each laps.lapList}}
      <p>{{.}}</p>
    {{/each}}
    

    {{.}} refers to the current object/element. If it contains a dictionaries/hashes e.g. [{elapsedTime:32.0, location: 'Chicago'}] then you can use the key name:

    {{#each laps.lapList}}
      <p>Lap took {{elapsedTime}}</p>
    {{/each}}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this template set __Self &set(const char *name, lua_CFunction func) { return rawSet(name,
I have this kinda template text : Hello {#Name#}, Thanks for coming blah on
i have this in my template <% @clients.each do |client| %> <li><%= link_to client.name,
I have this grid, containing a template: <Grid x:Name=Bar Width=400> <Grid.Resources> <DataTemplate x:Name=ScoreText> <Grid
I have this template function: template <class P> double Determinant(const P & a, const
I want to return a html by ajax, I have this $(a[rel^='valora']).click(function(){ var usuario=
I have this class template <class T> class dynamic_array { and this function: void
I have this smarty template, I need to call a function from my file.
Suppose I have this function template: template<typename T1, typename T2> auto DoSomething(const T1& arg);
I have this function: template <typename T> List<T>::ListNode *List<T>::find(int index) const { if (

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.