Search.../

items

Returns an array of groups items that match the query.

Description

items contains the current page of results retrieved by the query. If no results match the query, items is an empty array. The page size is defined by the limit() function and can be retrieved using the pageSize property. You can use the next() and prev() functions returned by groups to navigate the pages of a query result.

Type:

Array<
Group
>
NAME
TYPE
DESCRIPTION
_createdDate
Date

Group creation date and time.

_id
string

Group ID.

_updatedDate
Date

Date and time of the latest group update.

coverImage
CoverImage

Cover image. You cannot upload your own cover image.

description
string

Group description in DraftJS format.

lastActivityDate
Date

Date and time of the most recent group activity, for example a post or comment.

memberTitle
string

What group members are called, for example Coworkers, Friends, or Students.

membersCount
number

Total count of current group members.

name
string

Group name.

ownerId
string

Group owner.

privacyStatus
string

Group privacy status.

  • PUBLIC - Anyone can see the group and its content. Anyone can join the group.
  • PRIVATE - Anyone can see the group, but only members can see its content. New member must submit a Join Group Request.
  • SECRET - Only admins and members can see the group. New members can only be added by other members.
settings
GroupSettings

Group specific settings. Available to the site owners under Admin Tools in the Business Manager.

slug
string

A unique part of a group's URL, for example https:/example.com/groups/slug.

teaser
string

Group teaser.

Was this helpful?

Get items from a query result

Copy Code
1const returnedItems = results.items;
2
Perform a query and get items from the result

Copy Code
1import { groups } from 'wix-groups.v2';
2
3export async function myQueryFunction() {
4 const results = await groups.queryGroups().find();
5
6 const returnedItems = results.items;
7
8 if (returnedItems.length > 0) {
9 return items;
10 } else {
11 // Handle if no matching items found
12 }
13}
14