Solid · API

stream.select

Returns a stream for one part of the value, addressed by a path: keys and array indexes joined by dots, such as seats.1. The selected stream reads from the stream it was selected on, and is subscribed to and awaited in the same way. Calling select twice with the same path returns the same stream.

Schema
z.object({
  member: z.object({ name: z.string(), pass: z.string() }),
  seats: z.array(z.string()),
  why: z.string(),
})
Reply so far
{"member":{"name":"Grace","pass":"season"},"seats":["C4","C5"],"why":"Near
Expressions
stream.select('member').current()
stream.select('member.name').current()
stream.select('seats.1').current()
stream.select('why').current()
stream.select('seats') === stream.select('seats')
Output
[
  { name: 'Grace', pass: 'season' },
  'Grace',
  'C5',
  'Near',
  true,
]
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.