Learn more
Scrivito is proudly made by JustRelate Group in Berlin, Germany, and Wrocław, Poland.
Scrivito is proudly made by JustRelate Group
  • Product
    See a Demo
    Scrivito Customer Support
    Our Publications
  • Pricing
  • Solutions
  • Partners
    Partners
    The Scrivito Widget Marketplace
    Integrations
  • Developers
    Documentation Overview
    Editor’s Guide
    Admin’s Guide
    Quickstart Guides
    Extending the Example App (Basic)
    Extending the Example App (Advanced)
    Key Concepts
    Integrations
    Web Development Guides
    Advanced Use Cases
    Going Live
    JavaScript SDK API
    JavaScript SDK Release Notes
    Contact Customer Support
  • Sign up
  • My Scrivito
  • EN
    EnglishDeutsch
  • Developers
  • JavaScript SDK API
  • ObjSearch
  • first()

first()

Fetches the first search result.

Returns

An Obj or null – The first Obj that matches the search criteria, or null if the search result is empty.

Examples

Perform a full-text search for “apprentice”, returning only the best hit:

topResult = Scrivito.Obj.where("*", "contains", "apprentice").first();

See also

take, toArray

  • Documentation Overview
  • Editor’s Guide
  • Admin’s Guide
  • Quickstart Guides
  • Extending the Example App (Basic)
  • Extending the Example App (Advanced)
  • Key Concepts
  • Integrations
  • Web Development Guides
  • Advanced Use Cases
  • Going Live
  • JS SDK API
    • Top-Level API
    • Custom Attribute Types
    • Obj
    • Widget
    • Binary
    • Link
    • Editor
    • Team
    • MetadataCollection
    • ObjSearch
    • ObjFacetValue
    • SiteContext
    • Errors
    • React Components
    • Content not yet Loaded Error
  • JS SDK Release Notes
  • Contact Customer Support
  • and
  • andNot
  • boost
  • count
  • facet
  • first
  • offset
  • order
  • suggest
  • take
  • toArray
Scrivito
  • Start Free Trial
  • CMS Overview
  • Why Scrivito?
  • Technology
  • Integrations
  • Pricing
Support
  • Contact Support
  • Dashboard Login
  • Documentation
  • Release Notes
  • Widget Marketplace
  • Service Status
Legal
  • About Us
  • Imprint
  • Privacy Policy
  • Transparent Information
  • Terms of Service

© 2020 – All rights reserved Scrivito is proudly made by JustRelate Group in Berlin, Germany, and Wrocław, Poland.