File: basic-with-braces.test

package info (click to toggle)
haskell-doctemplates 0.11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 284 kB
  • sloc: haskell: 1,223; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ "employee":
  [ { "name": { "first": "John", "last": "Doe" } }
  , { "name": { "first": "Omar", "last": "Smith" }
    , "salary": "30000" }
  , { "name": { "first": "Sara", "last": "Chen" }
    , "salary": "60000" }
  ]
}
.
${ for(employee) }
Hi, ${employee.name.first}. ${ if(employee.salary) }You make $$${ employee.salary }.${ else }No salary data.${ endif }
${ endfor }
.
Hi, John. No salary data.
Hi, Omar. You make $30000.
Hi, Sara. You make $60000.