core.datasource.ArrayField.replaceIndex.ts Maven / Gradle / Ivy
import { ContextType } from './Context'
export function replaceIndex(data: string, ctx: ContextType) {
let result = data
for (const [key, value] of Object.entries(ctx)) {
result = result.replaceAll(`[${key}]`, `[${value}]`)
}
return result
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy