Solid · Completion
Array item completion
An array item is complete when the next item opens, and the last item when the array closes: the rule for fields, applied by index. In the example nights.0 is complete and can be used while nights.1 is still streaming.
z.object({
nights: z.array(z.object({ night: z.string(), title: z.string() })),
})for (const item of ['nights.0', 'nights.1', 'nights.2']) stream.select(item).onFinal(() => completed.push(item))
Stream, chunk by chunk
{"nights":[
{"night":"2026-10-23","title":"The Tempest"}[]
Runs in this page on the installed package. The input and the expected output are defined by the example.