I've set up a couple of characters:-
<<set $char1 to {name: "Bob", gender: "Male"}>>
<<set $char2 to {name: "Dave", gender: "Male"}>>
<<set $allcharacters to [$char1, $char2]>>
I want to create links on a page for each character, then when the user clicks the link know which character they picked and display some info (kind of like a bio).
<<for $i=0; $i < $allchars.length; $i++>>
[[$allchars[$i].name->CharacterBio][$item = $allchars[$i]]]
<</for>>
So then on the next passage I tried:-
<<print $item.name>>
But I get a undefined error, so I assume that it isn't been created, and I'm not understanding how to create the links on the previous passage.
Am I on the right lines, or am I trying to do this by some complicated method, when there is an easier way?