JS Collection.name returns undefined

edited February 3, 2021
How can I get the name of the collection?

I'm having trouble with a little script,
var collections = selected[0].getCollections();
var collection1 = collections[0];
return collection1.name;


When I return collection1.namethe result is: (undefined)

When I return collection1the result is: 5331 (number)
  • I finally found a solution for my issue, adding the get function:
    188BET靠谱吗var collection1 = Zotero.Collections.get(CollectionID);

    hopefully this will save someone else alot of time.
Sign Inor Registerto comment.