How to access JavaScript object other members data whilst iterating over array in handlebars each statement

SomethingElse

I have a JavaScript object like this

 Object {all: Array[5], cattype: "sometype"}

My question is, how to write cattype in the code below

I do this

 {{#each all}}           
    <li><a href="#{{cattype}}/{{ id }}" >{{{title}}}</a></li>
 {{/each}}

This code is working, just cattype is not written. Outside {{#each}} it's working of course.

Thank you very much for your attantion ! :)

SomethingElse

I found solution

{{../cattype}}

solved my problem

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Iterate over each object In array

분류에서Dev

Iterating over object to see if identical values are found

분류에서Dev

how to make widgets float over each other in flutter

분류에서Dev

Iterating over form elements array in React

분류에서Dev

iterate over case class data members

분류에서Dev

How to refer to each property of an object in an array of objects in MongoDB MapReduce JavaScript query?

분류에서Dev

how is Array object different from other objects

분류에서Dev

How to access attributes of php object inside a array of php objects from javascript

분류에서Dev

How to allow javascript to flow over other page elements

분류에서Dev

make object follow each other

분류에서Dev

How to check all members of an array

분류에서Dev

segfault when iterating over 2d array

분류에서Dev

javascript iterating array of objects using checkboxes

분류에서Dev

How access the data from an associative array Codeigniter

분류에서Dev

How access the data from an associative array Codeigniter

분류에서Dev

Loop over a reference object multiple times to copy its properties to other objects in Javascript/Angularjs

분류에서Dev

Sharing table data with each other

분류에서Dev

How to access class members from component properties?

분류에서Dev

can not access the array of an object

분류에서Dev

How to flatten an array of objects into arrays for each object parameter?

분류에서Dev

How can I retrieve the object into an array in Javascript?

분류에서Dev

JavaScript--merge two array objects into one arr object then loop through each index/object

분류에서Dev

Problems with iterating over a string

분류에서Dev

JavaScript array access issues

분류에서Dev

Handlebars - How to render all values inside array to the template model?

분류에서Dev

How to access a JavaScript object got from document.getelementbyId() in jQuery?

분류에서Dev

Javascript calling other object method

분류에서Dev

How to read additional data within handlebars block expression template?

분류에서Dev

How to execute a Javascript callback when a partial is rendered in Handlebars

Related 관련 기사

  1. 1

    Iterate over each object In array

  2. 2

    Iterating over object to see if identical values are found

  3. 3

    how to make widgets float over each other in flutter

  4. 4

    Iterating over form elements array in React

  5. 5

    iterate over case class data members

  6. 6

    How to refer to each property of an object in an array of objects in MongoDB MapReduce JavaScript query?

  7. 7

    how is Array object different from other objects

  8. 8

    How to access attributes of php object inside a array of php objects from javascript

  9. 9

    How to allow javascript to flow over other page elements

  10. 10

    make object follow each other

  11. 11

    How to check all members of an array

  12. 12

    segfault when iterating over 2d array

  13. 13

    javascript iterating array of objects using checkboxes

  14. 14

    How access the data from an associative array Codeigniter

  15. 15

    How access the data from an associative array Codeigniter

  16. 16

    Loop over a reference object multiple times to copy its properties to other objects in Javascript/Angularjs

  17. 17

    Sharing table data with each other

  18. 18

    How to access class members from component properties?

  19. 19

    can not access the array of an object

  20. 20

    How to flatten an array of objects into arrays for each object parameter?

  21. 21

    How can I retrieve the object into an array in Javascript?

  22. 22

    JavaScript--merge two array objects into one arr object then loop through each index/object

  23. 23

    Problems with iterating over a string

  24. 24

    JavaScript array access issues

  25. 25

    Handlebars - How to render all values inside array to the template model?

  26. 26

    How to access a JavaScript object got from document.getelementbyId() in jQuery?

  27. 27

    Javascript calling other object method

  28. 28

    How to read additional data within handlebars block expression template?

  29. 29

    How to execute a Javascript callback when a partial is rendered in Handlebars

뜨겁다태그

보관