{"modulePath":"github.com/bundleman/ferret","version":"v0.7.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package objects\n\n## Functions\n\n```go\nfunc Has(_ context.Context, args ...core.Value) (core.Value, error)\n```\nHas returns the value stored by the given key. @params (String) - The key name string. @returns (Boolean) - True if the key exists else false.\n\n```go\nfunc KeepKeys(_ context.Context, args ...core.Value) (core.Value, error)\n```\nKeepKeys returns a new object with only given keys. @params src (Object) - source object. @params keys (Array Of String OR Strings) - keys that need to be keeped. @returns (Object) - New Object with only given keys.\n\n```go\nfunc Keys(_ context.Context, args ...core.Value) (core.Value, error)\n```\nKeys returns string array of object's keys @params obj (Object) - The object whose keys you want to extract @params sort (Boolean, optional) - If sort is true, then the returned keys will be sorted. @returns (Array of String) - Array that contains object keys.\n\n```go\nfunc Merge(_ context.Context, args ...core.Value) (core.Value, error)\n```\nMerge merge the given objects into a single object. @params objs (Array Of Object OR Objects) - objects to merge. @returns (Object) - Object created by merging.\n\n```go\nfunc MergeRecursive(_ context.Context, args ...core.Value) (core.Value, error)\n```\nMergeRecursive recursively merge the given objects into a single object. @params objs (Objects) - objects to merge. @returns (Object) - Object created by merging.\n\n```go\nfunc NewLib() map[string]core.Function\n```\n\n```go\nfunc Values(_ context.Context, args ...core.Value) (core.Value, error)\n```\nValues return the attribute values of the object as an array. @params obj (Object) - an object. @returns (Array of Value) - the values of document returned in any order.\n\n```go\nfunc Zip(_ context.Context, args ...core.Value) (core.Value, error)\n```\nZip returns an object assembled from the separate parameters keys and values. Keys and values must be arrays and have the same length. @params keys (Array of Strings) - an array of strings, to be used as key names in the result. @params values (Array of Objects) - an array of core.Value, to be used as key values. @returns (Object) - an object with the keys and values assembled.\n\n","path":"github.com/bundleman/ferret/pkg/stdlib/objects","name":"objects","synopsis":"","isRedistributable":true}
