Debian Codegraph @

tests/inputs/inner_ref.jsonnet

raw
1 // https://jsonnet.org/learning/tutorial.html
2 {
3 Martini: {
4 local drink = self,
5 ingredients: [
6 { kind: "Farmer's Gin", qty: 1 },
7 {
8 kind: 'Dry White Vermouth',
9 qty: drink.ingredients[0].qty,
10 /* note ability to add
11 trailing commas */
12 },
13 ],
14 garnish: 'Olive',
15 served: 'Straight Up',
16 # The `self` keyword refers to the current
17 # object, which is the Martini in this case.
18 },
19 }