Fill Array Tool
This tool uses lodash _.fill() method to populate array elements with a specified value.
Features:
- Fill array elements with any value (string, number, boolean, object)
- Specify start and end positions for partial filling
- Parse values as JSON for proper type handling
- Support for nested arrays and objects
Examples:
- Basic fill:
- Input:
[1, 2, 3, 4, 5]
- Value:
*
- Start:
1, End: 4
- Output:
[1, '*', '*', '*', 5]
- Fill entire array:
- Input:
[null, null, null]
- Value:
"filled"
- Start:
0, End: (leave empty)
- Output:
["filled", "filled", "filled"]
- With JSON parsing:
- Input:
[1, 2, 3]
- Value:
true (with parseValueAsJSON checked)
- Output:
[true, true, true] (boolean, not string)