JCI-template engine: subloop-Example

  • JSON-Feed:
    {
      "level1":"course", "id":"3535","num":2,"elvs":48,
      "bookshelf":[
           "book0","book1","book2",
           "book3","book4","book5"
      ]
    }
    
  • Template:

    {subloop-array:bookshelf:3}
      1stbook: {0} thirdbook: {2}
    {/subloop-array:bookshelf}
    {subloop-array:bookshelf:20}
      2ndbook: {1}
    {/subloop-array:bookshelf}
    
  • Result:
    1stbook: book0 thirdbook: book2 2ndbook: book1