Files
MapLibreParticleLab/metrics/integration/expression-tests/slice/array-one-index/test.json
Bart Louwers c79b6dcf52 Add end-of-file-fixer pre-commit hook (#3176)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-24 20:43:50 +01:00

20 lines
675 B
JSON

{
"expression": ["slice", ["array", ["get", "val"]], ["get", "index"]],
"inputs": [
[{}, {"properties": {"val": [1, 2, 3, 4, 5], "index": 2}}],
[{}, {"properties": {"val": [1, 2, 3, 4, 5], "index": 0}}],
[{}, {"properties": {"val": [1, 2, 3, 4, 5], "index": 99}}],
[{}, {"properties": {"val": [1, 2, 3, 4, 5], "index": -2}}]
],
"expected": {
"serialized": ["slice", ["array", ["get", "val"]], ["get", "index"]],
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "array"
},
"outputs": [[3, 4, 5], [1, 2, 3, 4, 5], [], [4, 5]]
}
}