KeyRange over the object keys, or an empty range if this is not an object.var.byKey
KeyRange byKey() @safeGet a forward range over the keys of this object.
This method returns a KeyRange that can be used with std.algorithm functions and other range-based operations without allocating arrays.
Returns
A
Examples
import std.algorithm : filter, map;
import std.array : array;
var obj;
obj["name"] = "Alice";
obj["age"] = 30;
auto upperKeys = obj.byKey.map!(k => k.toUpper).array;