pkg_.without(P;K)

When applied to a package, returns a copy of package P without key(s) K (a string or lst() of strings).

Description

pkg_.without is a user-defined function (defined with <def_ufun/>). If you are not running your query in GUI2, pkg_.without will only work if you import the pkg_ library: <import path="default.library.types.pkg_"/>.

Syntax

pkg_.without(P;K)

Input

Argument Type Description
P any The name of a package variable
K any The name of a key

Return Value

pkg_.without returns pkg P without key K.

Example

<set x="{pkg('key1' 'key2';'val1' 'val2')}"/>
<signal msg="{lst_to_str(pkg_names(pkg_.without(@x;'key1'));',')}"/>

In the example above, the package x contains 'key1' and 'key2'. pkg_.without returns a copy of package x with 'key1' removed.