resolveArrayPath
Resolves an array placeholder path to a concrete indexed path.
Presentation
function resolveArrayPath (path: string, index: number): string;Returns
string -Resolved path with index (e.g., "items.0.quantity")
Parameters
| Name | Type | Description |
|---|---|---|
| path | string | The path with $ placeholder (e.g., "items.$.quantity") |
| index | number | The array index to substitute |
Example usage
resolveArrayPath ('items.$.quantity', 2)
// 'items.2.quantity'
resolveArrayPath ('orders.lineItems.$.total', 0)
// 'orders.lineItems.0.total'