Skip to main content
All CollectionsRecommendationsFAQ
Tags are saved and appear in brackets
Tags are saved and appear in brackets
Dan Macarie avatar
Written by Dan Macarie
Updated over 6 years ago

Nosto’s our tags are arrays as they may store more than a value.  So for example, if we set a variation of a T-shirt color within the tag1, the print of tag1 could be [“Red”,”Yellow”,”Green”,”Turtoise”] and the square brackets are part of the variable itself as it’s an array.

In order to fetch the values contained in it, we have to use the method get(n) where “n” is the position of the element, and the complete syntax is

$!product.tags1.get(n)

If we take in consideration the example above, $!product.tags1.get(0) will be “Red” (without quotes), $!product.tags1.get(1) will be “Yellow” and so on.
Whenever you have set only one value within the tag, $!product.tags1.get(0) will fetch it properly.

Did this answer your question?