Browse Source

Fix data bindings from JSON fields not correctly squashing nested structures beyond the first level

master
Andrew Kingston 5 years ago
parent
commit
122f8dba3a
  1. 5
      packages/builder/src/builderStore/jsonUtils.js

5
packages/builder/src/builderStore/jsonUtils.js

@ -28,7 +28,10 @@ const extractJSONSchemaKeys = (jsonSchema, squashObjects = false) => {
Object.keys(jsonSchema).forEach(key => {
const type = jsonSchema[key].type
if (type === "json" && squashObjects) {
const childKeys = extractJSONSchemaKeys(jsonSchema[key].schema)
const childKeys = extractJSONSchemaKeys(
jsonSchema[key].schema,
squashObjects
)
keys = keys.concat(
childKeys.map(childKey => ({
key: `${key}.${childKey.key}`,

Loading…
Cancel
Save