authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-06 03:26:55 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-06 03:26:55 -07:00
log8c4045be2ec6d9cb59136403edab62cdd35f6eb0
tree84c2f96672a34df3fc88dbdce1f29cf5405e08f9
parent2bd86cc2bdf8e75d5656c8078656e3b27ee9a050

example- add more values


1 files changed, 6 insertions(+), 6 deletions(-)

src/main.zig+6-6
......@@ -18,7 +18,7 @@ const example_document =
1818 \\ p("The most populous US cities are:")
1919 \\ ul(
2020 \\ {#each top_cities}
21 \\ li({name})
21 \\ li({this.name}", "{this.state.code})
2222 \\ /each/
2323 \\ )
2424 \\ )
......@@ -36,11 +36,11 @@ pub fn main() !void {
3636 .flower = "Sunflower",
3737 },
3838 .top_cities = .{
39 .{ .name = "New York" },
40 .{ .name = "Los Angeles" },
41 .{ .name = "Chicago" },
42 .{ .name = "Houston" },
43 .{ .name = "Phoenix" },
39 .{ .name = "New York", .state = .{ .code = "NY" } },
40 .{ .name = "Los Angeles", .state = .{ .code = "CA" } },
41 .{ .name = "Chicago", .state = .{ .code = "IL" } },
42 .{ .name = "Houston", .state = .{ .code = "TX" } },
43 .{ .name = "Phoenix", .state = .{ .code = "AZ" } },
4444 },
4545 });
4646 std.debug.print("\n", .{});