File: basic.test

package info (click to toggle)
haskell-doctemplates 0.11.0.1-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 288 kB
  • sloc: haskell: 1,223; makefile: 7
file content (16 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (3)
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.