WeivData API Reference | ExWeiv Apps
    Preparing search index...

    Function push

    • Type Parameters

      Parameters

      • collectionId: string

        The ID of the collection to push/add the items from.

      • itemId: ItemID

        ItemID to filter the _id field when performing the operation.

      • propertyName: Extract<keyof CItem>

        Property name for the array field.

      • value: any

        Values to push into array.

      • Optionaloptions: WeivDataOptions

        An object containing options to use when processing this operation.

      Returns Promise<null | CItem>

      Fulfilled - Updated item. Rejected - The error caused the rejection.

      You can use push function to push new values into an array field in an item. This function uses $push operator to remove data from an array.