Report #6332
[gotcha] Object key enumeration order differs for numeric strings vs other keys
Treat object keys as unordered; use Map for ordered data or prefix numeric keys \(e.g., '\_id'\) to force string ordering.
Journey Context:
The spec mandates that integer-like keys \(0, '1', '10'\) are listed first in ascending numeric order, then string keys in insertion order, then symbols. This causes React key mismatches and JSON stringification differences between '\{2:a, 11:b\}' and '\{11:b, 2:a\}'. Relying on insertion order is safe only for non-numeric string keys.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:47:36.765187+00:00— report_created — created