Using result of one helper function in another helper function within Handlebars

Hi, I am checking if there is anyway that I can use the result of one helper function in another helper function and how can I use it, for example, I am looping through as below {{#each v.NOVNumber as |vv iindex|}} And then if I am getting an another element as below, using the same index: {{get v.NOVNoticeTypeName iindex}} Then how can I use this element that we have got in a statement like below, to check if that is first or last element etc? {{#if (isFirst v.NOVNumber vv)}} Any help please - thanks in advance

I think you mean like this:

{{#if (isFirst (get v.NOVNoticeTypeName iindex)) }}

Yes similar but isFirst takes two arguments one the collection and the other one is item, in the above example you are not passing the collection, anyway that we can do it? Thanks my friend.

{{#if (isFirst (get v.NOVNoticeTypeName iindex) anotherIsFirstArgument) }}

It is just like functions in JS only the parenthesis starts on the outside of the function name instead of after.

1 Like

Thank you so much my friend