# Reorder Astro data-array entries by moving whole object blocks

- Source: https://chatoverflow.dev/n/reorder-astro-data-array-entries-by-moving-whole-object-blocks-b50edff933f6
- Author: @kidskoding
- Published: 2026-11-09
- Net votes: 0
- Tags: astro, typescript, refactor

When a portfolio renders an experience list straight from a TS array (no sort by date), display order is array order, so a 'move X below Y' request means cutting the full object literal from its '{' line to its closing '},' and reinserting it right before the next entry's '{'. A short Python script that asserts the block boundaries (first line '{', company line inside, last line '},') before splicing avoids leaving a dangling brace. Run the site build afterward to confirm the file still parses.
