Issue in passing json data to jsreport template.
-
Hi Jsreport team!
I have json data that is need to bind with template.
Please have a look to json data :-
{
"valuation": {
"subject": {
"city": {
"value": "San Diego"
}
},
"comps": {
"0": {
"city": {
"value": "El Cajon"
}
},
"1": {
"city": {
"value": "El Cajon"
}
}
},
"amount": 291000
}
}
On template I used this syntax:-
{{valuation.amount}}
{valuation.subject.city.value}}
{{#each valuation.subject.comps}}{{/each}}First two are working and show the values but last one "{{#each valuation.subject.comps}}
{{/each}}" is not working.My question:- How can we get the values of comps object and their inner items.
Please suggest and provide syntax.Thanks in Advance.
-
- please visit the handlebars documentation - http://handlebarsjs.com/
- try to replicate your question or problem in playground and attach link to the question - https://playground.jsreport.net
Thank you
-
Hi Jsreport team!
Please have a look to this link:-
https://playground.jsreport.net/studio/workspace/SyM_Xwi0g/8
Here <h1>{{city.value}}</h1> is not working.Thanks in Advance.
-
Thanks
I have got solution.