This function returns a thing from a set. The set must contain at least one thing, otherwise a lookup_err() is raised.
The thing which is returned from the set is neither random nor predictable.
This function does not generate a change.
set.one()
None
One thing from the set or a lookup_err() when empty.
This code shows an example using one():
// Returns either Iris, Cato or Tess
set({name: 'Iris'},
{name: 'Cato'},
{name: 'Tess'},
).one();
Example return value in JSON format
{
"name": "Iris"
}