function combinePropertyObjects(objArr1, objArr2) {
	const res = [];

	if (objArr1.length === 0) {
		return objArr2;
	}
	if (objArr2.length === 0) {
		return objArr1;
	}
	objArr1.forEach(obj1 => {
		objArr2.forEach(obj2 => {
			const combinedObj = {};
			const obj1Props = Object.keys(obj1);
			const obj2Props = Object.keys(obj2);

			obj1Props.forEach(prop1 => {
				combinedObj[prop1] = obj1[prop1];
			});
			obj2Props.forEach(prop2 => {
				combinedObj[prop2] = obj2[prop2];
			});
			res.push(combinedObj);
		});
	});
	return res;
}
Create valid rule configurations by combining two arrays,
with each array containing multiple objects each with a
single property/value pair and matching properties.

e.g.:
combinePropertyObjects(
    [{before: true}, {before: false}],
    [{after: true}, {after: false}]
);

will return:
[
    {before: true, after: true},
    {before: true, after: false},
    {before: false, after: true},
    {before: false, after: false}
]
@param {Object[]} objArr1 Single key/value objects, all with the same key
@param {Object[]} objArr2 Single key/value objects, all with another key
@returns {Object[]} Combined objects for each combination of input properties and values