I have a json like this :
{
"name" : "xyz",
"age" : "12",
"familyprofile" :
[{"name" :"abc", "Occupation":"manager","age":"30" },{"name" :"def","Occupation":"housewife","age":"30"}]
}
i am trying to print family profiles in table using velocity template.
<table>
<tr>
<td><b>name</b></td>
<td><b>Occupation</b></td>
<td><b>age</b></td>
</tr>
#set($steps = {$headers.familyprofile})
#foreach($step in $steps)
<tr>
<td>step.name</td>
<td>step.Occupation</td>
<td>step.age</td>
</tr>
#end
</table>
It's a syntax problem, you should use:
or: