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 =...@@ -18,7 +18,7 @@ const example_document =
18 \\ p("The most populous US cities are:")18 \\ p("The most populous US cities are:")
19 \\ ul(19 \\ ul(
20 \\ {#each top_cities}20 \\ {#each top_cities}
21 \\ li({name})21 \\ li({this.name}", "{this.state.code})
22 \\ /each/22 \\ /each/
23 \\ )23 \\ )
24 \\ )24 \\ )
...@@ -36,11 +36,11 @@ pub fn main() !void {...@@ -36,11 +36,11 @@ pub fn main() !void {
36 .flower = "Sunflower",36 .flower = "Sunflower",
37 },37 },
38 .top_cities = .{38 .top_cities = .{
39 .{ .name = "New York" },39 .{ .name = "New York", .state = .{ .code = "NY" } },
40 .{ .name = "Los Angeles" },40 .{ .name = "Los Angeles", .state = .{ .code = "CA" } },
41 .{ .name = "Chicago" },41 .{ .name = "Chicago", .state = .{ .code = "IL" } },
42 .{ .name = "Houston" },42 .{ .name = "Houston", .state = .{ .code = "TX" } },
43 .{ .name = "Phoenix" },43 .{ .name = "Phoenix", .state = .{ .code = "AZ" } },
44 },44 },
45 });45 });
46 std.debug.print("\n", .{});46 std.debug.print("\n", .{});