Collection.prototype.attrStr()

Return string file attribute value for the first file in the collection where it is defined.

Syntax

collection.attrStr(key string) string

Parameters

key string

Name of the attribute.

Description

Walk the collection and return the first string file attribute value that is defined. When the attribute is not defined on any of the files, an empty value of the type is returned, which is an empty string.

Examples

Empty collection.

Getting undefined attribute.

Single defined attribute.

Return the first value found.