We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6f1e4e commit 78dbbf6Copy full SHA for 78dbbf6
kleros-sdk/src/dataMappings/utils/createResultObject.ts
@@ -4,7 +4,7 @@ export const createResultObject = (sourceData, seek: string[], populate: string[
4
const getNestedValue = (obj: any, path: string) => {
5
return path.split(".").reduce((acc, part) => {
6
if (acc && part.includes("[")) {
7
- const [key, index] = part.replace("]", "").split("[");
+ const [key, index] = part.replace(/\]/g, "").split("[");
8
return acc[key]?.[index];
9
}
10
return acc ? acc[part] : undefined;
0 commit comments