Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Javascript join data from datamap?

$
0
0
I know it's much more a Javascript question, but anyway...

Let's say I have this...
(print: $weapons.join(", "))
...and the weapons var is an array with datamaps, so if it has 2 objects, it will be printed as [object Map], [object Map]. How can I print a list of each object by one of its values inside a datamap, if possible?

This is the structure of each datamap inside the array $weapons:
(datamap:
	"Name","Hammer",
	"Description","Yeah, it's a hammer.",
	"slot","right_hand"
)
I want to produce a list of "Name"s...

Viewing all articles
Browse latest Browse all 1844

Trending Articles