You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few different ways you can do that. But remember that on the last iteration of the loop, the next object is undefined. So you need a null check, before getting the Name value.
Here is one way - using a contextual template parameter, ~arr to get at the array from within the loop item block.
and then use it like this {{get #index+1 'Name'/}}, to get the Name of the next object. Here the null check is in code.
Yet another approach would be to create a custom helper function such as ~get(index, field) and write {{:~get(#index, 'Name')}}.
A better place for this kind of question is probably on Stack Overflow. Could you perhaps post your question there, so I can then post this reply, so other people can find it more easily than here in clsoed issues, and be helped with similar scenarios? Thanks.
Hi Boris,
Im have next basic code
but im wont in current loop get a next loop name value
as next code
How can im to do it in jsview ?
thankyou
The text was updated successfully, but these errors were encountered: