Create an anonymous type from a given thing.
We recommend using the anonymous syntax &{...}. Unlike the ano(...) function, the &{...} literal syntax allows ThingsDB to perform compile-time optimization.
This function does not generate a change.
ano(value)
| Argument | Type | Description |
|---|---|---|
| value | thing | The thing representing the anonymous type. |
Return with an anonymous type.
This code shows how the
anofunction can be used.
filter = ano({
name: 'str',
email: 'str'
});
{
name: 'Jeroen van der Heijden',
email: 'jeroen@cesbit.com',
password_hash: 'SGVsbG8gVGhpbmdzREIhCg==',
}.wrap(filter);
// Output only the `name`, `user`
Return value in JSON format
{
"name": "Jeroen van der Heijden",
"email": "jeroen@cesbit.com"
}