/** * Retrieves the value from an array based on the provided segment. * @param {unknown} value - The value to search within (typically an array or object). * @param {string} segment - The segment representing the array and index (e.g., 'array[0]'). * @param {string | undefined} currentPath - The current path in the object hierarchy. * @param {string} path - The full path in the object hierarchy. * @returns {unknown} The value retrieved from the array based on the segment. * @example // Example usage * const value = { a: [ 'b', ['c', 'd', ['e', 'f', 'g']]] } * const path = 'parent.a[1][2][3].length'; * const currentPath = 'parent'; * const segment = 'a[1][2][3]'; * console.log(getArrayValue(data, segment, currentPath, path)); * // Output: "g" */ declare const getArrayValue: (value: unknown, segment: string, currentPath: string | undefined, path: string) => unknown; export default getArrayValue;