Welcome to the new Box Support website. Check out all the details here on what’s changed.

Get first item from search

New post

Comments

1 comment

  • Lukasz Socha

    Hi!
    query() method returns BoxObjectCollection object, which inherits from Iterator. Therefore you can use either next() method exposed by BoxObjectCollection class or next() method inherited form Iterator class. To get first item you can do:

    item1 = items1.next() # recommended 

    or

    item1 = next(items1)

    Regards

    0
    Comment actions Permalink

Post is closed for comments.