javascript - How to render dynamic generated key in mustache -


I have a Jasonson data with fields. I want to present it to the mustache in JS. But one item from the problem list is being dynamically generated. How can I iterate this item?

I used the given code

  '{{#view}} {{#.}} & Lt; Td class = "number" & gt; {{.}} & Lt; / Td> {{.}} {{/ View}} '+' {{#comment}} {{#.}} & Lt; Td square = "number" & gt; {{.}} & Lt; / Td> {{/}} '{'} '' {{#rating}} {{#.}} & Lt; Td square = "number" & gt; {{.}}  

But this [object Object] as rendering

How can I resolve this issue?

. to run again through an array of strings, so your template will not work, however, you can process before it can be parsed always template to your data / modified:

< data> in the data (code) {if (key == 'comment' || key == 'rating' || key == 'scene') {// Change it to an array temp_array = []; (Key [data [key] in) {// This is not to make objects that function or __proto_, if (type of data [key] [Key2]! = "Object" and amp; amp;]! = "Function") {temp_array.push (data [key] [key2]); }} Data [key] = temp_array; }}

To change the list of items in an array and then parse the template.

Hope this help.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -