Prism · Arrays

$slice

A stretch of an array or of a string, from start up to but not including end. start defaults to 0 and end to the length.

The source
{ letters: ['a', 'b', 'c', 'd', 'e'], word: 'transform' }
The config
{
  middle: {
    $slice: { from: { $ref: '$.letters' }, start: 1, end: 4 },
  },
  prefix: {
    $slice: { from: { $ref: '$.word' }, start: 0, end: 5 },
  },
}
What comes out
{ middle: ['b', 'c', 'd'], prefix: 'trans' }
Output matches the expected value

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