It seems map keys that aren't strings get implicitly converted to `string`. For example, the following expressions fail unexpectedly ``` 1 in { 1: 0 } Error: cannot use int as type string in map key (1:3) | 1 in {1: 0} | ..^ ``` ``` { 1: 0 }[1] Error: cannot use int to get an element from map[string]interface {} (1:8) | {1: 0}[1] | .......^ ``` This expression evaluates to `true` ``` {1: 0} | keys() | first() | type() == "string" ```
Activity
antonmedv commentedon Nov 17, 2025
Yes, all
{}within Expr created asmap[string]anyfor uniformity.But you can use
inwith an array.Expr will compile array to object
map[int]struct{}