Is it possible to get just the 2nd or 3rd item in the list?

Any questions? Need some help?
Post Reply
User avatar
encryptedbytes
Posts: 9
Joined: 25 Oct 2012, 23:23

Is it possible to get just the 2nd or 3rd item in the list?

Post by encryptedbytes »

I am wondering if it is possible to get just the second item in a list, such as the second genre? I am interested to sort movie files using a structure like this:

\genre1\genre2\
~ EncryptedBytes
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Is it possible to get just the 2nd or 3rd item in the li

Post by rednoah »

{genres} is List type object. So you can do {genres[0]}, {genres[1]}, ... and all the other Groovy sugar, e.g. {genres.join('/')}
:idea: Please read the FAQ and How to Request Help.
Post Reply