A compatible BankBranch is a hybrid value that can be accessed both as
a single branch (the legacy shape, e.g. branch.code) and as an array of
branches (the shape introduced in the 2025-01-01 API version, e.g.
branch[0].code). The scalar fields mirror the first element of the array.
Caveat: because the scalar fields are attached to an array, this hybrid is
transparent for field access but not for serialization or key
enumeration. JSON.stringify(branch) emits the array form ([{...}]) and
drops the top-level scalar fields, and Object.keys(branch) yields the
numeric indices alongside the scalar keys (e.g. ["0", "code", ...]). Read
fields directly rather than round-tripping the value through JSON.
A compatible
BankBranchis a hybrid value that can be accessed both as a single branch (the legacy shape, e.g.branch.code) and as an array of branches (the shape introduced in the 2025-01-01 API version, e.g.branch[0].code). The scalar fields mirror the first element of the array.Caveat: because the scalar fields are attached to an array, this hybrid is transparent for field access but not for serialization or key enumeration.
JSON.stringify(branch)emits the array form ([{...}]) and drops the top-level scalar fields, andObject.keys(branch)yields the numeric indices alongside the scalar keys (e.g.["0", "code", ...]). Read fields directly rather than round-tripping the value through JSON.