ano

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.

Function

ano(value)

Arguments

Argument Type Description
value thing The thing representing the anonymous type.

Return value

Return with an anonymous type.

Example

This code shows how the ano function 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"
}