function transformObjectBranch(itemChilds, schema) {
	if (get(schema, 'type.values') || get(schema, 'values')) {
		return Object.entries(itemChilds).map(obj => {
			const OBJECT_KEY = 0;
			const OBJECT_VALUE = 1;
			return {
				dataKey: obj[OBJECT_KEY],
				value: {
					schema: get(schema, 'type.values', schema),
					data: { ...obj[OBJECT_VALUE] },
				},
			};
		});
	}
	return getNextSchemaItems(schema).map(itemSchema => {
		const item = itemChilds[itemSchema.name];
		return {
			dataKey: itemSchema.name,
			value: {
				schema: itemSchema,
				data: item,
			},
		};
	});
}
/**
 * We are reading the schema, using its keys to construct the next records branch.
 * Return an array of items transformed.
 * @param {object} value
 * @param {object} schema
 */
We are reading the schema, using its keys to construct the next records branch.
Return an array of items transformed.
@param {object} value
@param {object} schema
We are reading the schema using its keys to construct the next records branch . Return an array of items transformed . @param { object } value @param { object } schema
function transformObjectBranch(itemChilds, schema) {
	if (get(schema, 'type.values') || get(schema, 'values')) {
		return Object.entries(itemChilds).map(obj => {
			const OBJECT_KEY = 0;
			const OBJECT_VALUE = 1;
			return {
				dataKey: obj[OBJECT_KEY],
				value: {
					schema: get(schema, 'type.values', schema),
					data: { ...obj[OBJECT_VALUE] },
				},
			};
		});
	}
	return getNextSchemaItems(schema).map(itemSchema => {
		const item = itemChilds[itemSchema.name];
		return {
			dataKey: itemSchema.name,
			value: {
				schema: itemSchema,
				data: item,
			},
		};
	});
}
function transformObjectBranch ( itemChilds , schema ) { if ( get ( schema , 'type.values' ) || get ( schema , 'values' ) ) { return Object . entries ( itemChilds ) . map ( obj => { const OBJECT_KEY = 0 ; const OBJECT_VALUE = 1 ; return { dataKey : obj [ OBJECT_KEY ] , value : { schema : get ( schema , 'type.values' , schema ) , data : { ... obj [ OBJECT_VALUE ] } , } , } ; } ) ; } return getNextSchemaItems ( schema ) . map ( itemSchema => { const item = itemChilds [ itemSchema . name ] ; return { dataKey : itemSchema . name , value : { schema : itemSchema , data : item , } , } ; } ) ; }
We are reading the schema, using its keys to construct the next records branch.
We are reading the schema using its keys to construct the next records branch .