Question
JOLT SPEC
Hi team I want a jolt spec where I want the output to be completely flattened json. this is my input json and assuming where ever there is nested array it should be mapped with other nested array as well. this is my input json -
{
"unitOfMeasure": "unit:piece",
"linkedDemandSeries": [
{
"loadFactor": 3.5,
"materialNumberCustomer": "MNR-7307-AU340474.002",
"materialNumberSupplier": "MNR-8101-ID146955.001",
"customerLocation": "{{CATENAX-CUSTOMER-BPNS}}",
"demandCategory": {
"demandCategoryCode": "0001"
}
},
{
"loadFactor": 4.0,
"materialNumberCustomer": "MNR-7307-AU340474.002",
"materialNumberSupplier": "MNR-8101-ID146955.001",
"customerLocation": "{{CATENAX-CUSTOMER-BPNS}}",
"demandCategory": {
"demandCategoryCode": "0002"
}
}
],
"linkedCapacityGroups": [
"be4d8470-2de6-43d2-b5f8-2e5d3eebf3fd",
"ab4d8470-2de6-43d2-b5f8-2e5d3eebf3fd"
],
"unitOfMeasureIsOmitted": false,
"capacityGroupIsInactive": true,
"demandVolatilityParameters": {
"rollingHorizonAlertThresholds": [
{
"sequenceNumber": 1,
"absoluteNegativeDeviation": 100.0,
"subhorizonLength": 4,
"relativeNegativeDeviation": 0.3,
"absolutePositiveDeviation": 100.0,
"relativePositiveDeviation": 0.2
}
],
"measurementInterval": 4,
"startReferenceDateTime": "2024-01-10T12:00:00.320Z"
},
"supplier": "{{CATENAX-SUPPLIER-BPNL}}",
"name": "Spark Plugs on drilling machine for car model XYZ",
"supplierLocations": [
"{{CATENAX-SUPPLIER-BPNS}}",
"{{CATENAX-SUPPLIER-BPNS-1}}"
],
"capacities": [
{
"pointInTime": "2022-08-01",
"agreedCapacity": 1800,
"actualCapacity": 1000,
"maximumCapacity": 2000,
"deltaProductionResult": 400
}
],
"changedAt": "2023-03-10T12:27:11.320Z",
"capacityGroupId": "0157ba42-d2a8-4e28-8565-7b07830c1110",
"customer": "{{CATENAX-CUSTOMER-BPNL}}"
}. The output should look like this. -
[
{
"unitOfMeasure": "unit:piece",
"loadFactor": 3.5,
"materialNumberCustomer": "MNR-7307-AU340474.002",
"materialNumberSupplier": "MNR-8101-ID146955.001",
"customerLocation": "{{CATENAX-CUSTOMER-BPNS}}",
"demandCategoryCode": "0001",
"linkedCapacityGroups": "be4d8470-2de6-43d2-b5f8-2e5d3eebf3fd",
"unitOfMeasureIsOmitted": false,
"capacityGroupIsInactive": true,
"sequenceNumber": 1,
"absoluteNegativeDeviation": 100,
"subhorizonLength": 4,
"relativeNegativeDeviation": 0.3,
"absolutePositiveDeviation": 100,
"relativePositiveDeviation": 0.2,
"measurementInterval": 4,
"startReferenceDateTime": "2024-01-10T12:00:00.320Z",
"supplier": "{{CATENAX-SUPPLIER-BPNL}}",
"name": "Spark Plugs on drilling machine for car model XYZ",
"supplierLocations": "{{CATENAX-SUPPLIER-BPNS}}",
"pointInTime": "2022-08-01",
"agreedCapacity": 1800,
"actualCapacity": 1000,
"maximumCapacity": 2000,
"deltaProductionResult": 400,
"changedAt": "2023-03-10T12:27:11.320Z",
"capacityGroupId": "0157ba42-d2a8-4e28-8565-7b07830c1110",
"customer": "{{CATENAX-CUSTOMER-BPNL}}"
},
{
"unitOfMeasure": "unit:piece",
"loadFactor": 3.5,
"materialNumberCustomer": "MNR-7307-AU340474.002",
"materialNumberSupplier": "MNR-8101-ID146955.001",
"customerLocation": "{{CATENAX-CUSTOMER-BPNS}}",
"demandCategoryCode": "0001",
"linkedCapacityGroups": "ab4d8470-2de6-43d2-b5f8-2e5d3eebf3fd",
"unitOfMeasureIsOmitted": false,
"capacityGroupIsInactive": true,
"sequenceNumber": 1,
"absoluteNegativeDeviation": 100,
"subhorizonLength": 4,
"relativeNegativeDeviation": 0.3,
"absolutePositiveDeviation": 100,
"relativePositiveDeviation": 0.2,
"measurementInterval": 4,
"startReferenceDateTime": "2024-01-10T12:00:00.320Z",
"supplier": "{{CATENAX-SUPPLIER-BPNL}}",
"name": "Spark Plugs on drilling machine for car model XYZ",
"supplierLocations": "{{CATENAX-SUPPLIER-BPNS}}",
"pointInTime": "2022-08-01",
"agreedCapacity": 1800,
"actualCapacity": 1000,
"maximumCapacity": 2000,
"deltaProductionResult": 400,
"changedAt": "2023-03-10T12:27:11.320Z",
"capacityGroupId": "0157ba42-d2a8-4e28-8565-7b07830c1110",
"customer": "{{CATENAX-CUSTOMER-BPNL}}"
}
] can anyone give me jolt spec for the input json I provided

