function extractParameters(parameters, properties, schema) {
	if (!parameters || !Array.isArray(parameters)) {
		return {};
	}
	const flattenProps = flatten(properties, { includeObjects: true });
	return parameters.reduce((acc, param) => {
		const path = getPathWithArrayIndex(param.path, schema);
		const value = flattenProps[path];
		if (typeof value === 'object') {
			Object.keys(value)
				.filter(key => typeof value[key] !== 'object')
				.forEach(key => {
					acc[`${param.key}${key}`] = value[key];
				});
		} else {
			acc[param.key] = value;
		}
		return acc;
	}, {});
}
/**
 * extract parameters from properties
 * @param {Array} parameters required
 * @param {Object} properties source of the data
 * @param {Object} schema of the current field the trigger is executed
 * @return {Object} payload of the trigger
 */
extract parameters from properties
@param {Array} parameters required
@param {Object} properties source of the data
@param {Object} schema of the current field the trigger is executed
@return {Object} payload of the trigger
extract parameters from properties @param { Array } parameters required @param { Object } properties source of the data @param { Object } schema of the current field the trigger is executed @return { Object } payload of the trigger
function extractParameters(parameters, properties, schema) {
	if (!parameters || !Array.isArray(parameters)) {
		return {};
	}
	const flattenProps = flatten(properties, { includeObjects: true });
	return parameters.reduce((acc, param) => {
		const path = getPathWithArrayIndex(param.path, schema);
		const value = flattenProps[path];
		if (typeof value === 'object') {
			Object.keys(value)
				.filter(key => typeof value[key] !== 'object')
				.forEach(key => {
					acc[`${param.key}${key}`] = value[key];
				});
		} else {
			acc[param.key] = value;
		}
		return acc;
	}, {});
}
function extractParameters ( parameters , properties , schema ) { if ( ! parameters || ! Array . isArray ( parameters ) ) { return { } ; } const flattenProps = flatten ( properties , { includeObjects : true } ) ; return parameters . reduce ( ( acc , param ) => { const path = getPathWithArrayIndex ( param . path , schema ) ; const value = flattenProps [ path ] ; if ( typeof value === 'object' ) { Object . keys ( value ) . filter ( key => typeof value [ key ] !== 'object' ) . forEach ( key => { acc [ ` ${ param . key } ${ key } ` ] = value [ key ] ; } ) ; } else { acc [ param . key ] = value ; } return acc ; } , { } ) ; }
extract parameters from properties
 @param {Array} parameters required
 @param {Object} properties source of the data
 @param {Object} schema of the current field the trigger is executed
 @return {Object} payload of the trigger
extract parameters from properties @param { Array } parameters required @param { Object } properties source of the data @param { Object } schema of the current field the trigger is executed @return { Object } payload of the trigger