cables is under heavy development.
There might be one or another bug, please let us know about it!

ArrayGetValuesByIndexArray Op

Namespace: Ops.Arrays

Op author: kikohs

Pick values from input array at given indices and stride

Base example

const input_array = ['I', 'love', 'not', 'cables'];
const array_stride = 1;
const index_array = [0, 1, 3];

const result = ['I', 'love', 'cables'];

Advanced case, changing the input stride

Changing the stride is helpful to pick values from Array2, Array3 or Array4.

const input_array = [0,0,0, 1,1,1, 2,2,2];
const stride = 3;
const index_array = [0, 2];

const result = [0,0,0, 2,2,2];


Array (Array)

Input array with all values

Array Stride index (integer /Number)


Indices (Array)

List of indices to pick


Results (Array)

Caught a mistake or want to contribute to the documentation?

Edit Documentation 

ArrayGetValuesByIndexArray example

Demonstrate how to use ArrayGetValuesByIndexArray OP

Patches using ArrayGetValuesByIndexArray

  • Examples (1)
  • Public
  • My Patches


created op
2023-02-28 - kikohs
cloned op from Ops.User.kikohs.ArrayGetValuesByIndexArray
2023-03-06 - stephan
renameOps.User.stephan.ArrayGetValuesByIndexArray renamed to Ops.Dev.Arrays.ArrayGetValuesByIndexArray
2023-03-06 - stephan
renameOps.Dev.Arrays.ArrayGetValuesByIndexArray renamed to Ops.Arrays.ArrayGetValuesByIndexArray
2023-03-06 - stephan