title: Flattening JSON with schema changes in a single JSON object
body: <p>I am new to ADF and looking to flatten the data of a complex JSON object. The JSON comes in from Genesys API endpoint. Although Genesys has defined a response schema, there is no guarantee that all the keys defined in the schema will be part of the response JSON. Following is an example of the JSON object with a different set of keys. I have replaced identifiable information with &quot;hidden&quot; for relevant keys.</p>
  <pre><code>{
              &quot;conversationEnd&quot;: &quot;2022-03-20T18:53:14.696Z&quot;,
              &quot;conversationId&quot;: &quot;hidden&quot;,
              &quot;conversationStart&quot;: &quot;2022-03-20T18:52:43.441Z&quot;,
              &quot;divisionIds&quot;: [
                  &quot;hidden&quot;
              ],
              &quot;mediaStatsMinConversationMos&quot;: 4.882435906757346,
              &quot;mediaStatsMinConversationRFactor&quot;: 92.44477081298828,
              &quot;originatingDirection&quot;: &quot;inbound&quot;,
              &quot;participants&quot;: [
                  {
                      &quot;participantId&quot;: &quot;hidden&quot;,
                      &quot;participantName&quot;: &quot;hidden&quot;,
                      &quot;purpose&quot;: &quot;external&quot;,
                      &quot;sessions&quot;: [
                          {
                              &quot;ani&quot;: &quot;hidden&quot;,
                              &quot;direction&quot;: &quot;inbound&quot;,
                              &quot;dnis&quot;: &quot;hidden&quot;,
                              &quot;edgeId&quot;: &quot;hidden&quot;,
                              &quot;mediaType&quot;: &quot;voice&quot;,
                              &quot;protocolCallId&quot;: &quot;hidden&quot;,
                              &quot;provider&quot;: &quot;Edge&quot;,
                              &quot;recording&quot;: true,
                              &quot;remoteNameDisplayable&quot;: &quot;hidden&quot;,
                              &quot;sessionDnis&quot;: &quot;hidden&quot;,
                              &quot;sessionId&quot;: &quot;hidden&quot;,
                              &quot;mediaEndpointStats&quot;: [
                                  {
                                      &quot;codecs&quot;: [
                                          &quot;audio/opus&quot;
                                      ],
                                      &quot;eventTime&quot;: &quot;2022-03-20T18:53:14.724Z&quot;,
                                      &quot;maxLatencyMs&quot;: 30,
                                      &quot;minMos&quot;: 4.882435906757346,
                                      &quot;minRFactor&quot;: 92.44477081298828,
                                      &quot;receivedPackets&quot;: 950
                                  }
                              ],
                              &quot;metrics&quot;: [
                                  {
                                      &quot;emitDate&quot;: &quot;2022-03-20T18:52:55.715Z&quot;,
                                      &quot;name&quot;: &quot;nConnected&quot;,
                                      &quot;value&quot;: 1
                                  }
                              ],
                              &quot;segments&quot;: [
                                  {
                                      &quot;conference&quot;: false,
                                      &quot;segmentEnd&quot;: &quot;2022-03-20T18:52:55.715Z&quot;,
                                      &quot;segmentStart&quot;: &quot;2022-03-20T18:52:43.442Z&quot;,
                                      &quot;segmentType&quot;: &quot;system&quot;
                                  },
                                  {
                                      &quot;conference&quot;: false,
                                      &quot;disconnectType&quot;: &quot;endpoint&quot;,
                                      &quot;q850ResponseCodes&quot;: [
                                          16
                                      ],
                                      &quot;segmentEnd&quot;: &quot;2022-03-20T18:53:14.695Z&quot;,
                                      &quot;segmentStart&quot;: &quot;2022-03-20T18:52:55.715Z&quot;,
                                      &quot;segmentType&quot;: &quot;interact&quot;
                                  }
                              ]
                          }
                      ]
                  },
                  {
                      &quot;participantId&quot;: &quot;hidden&quot;,
                      &quot;purpose&quot;: &quot;hidden&quot;,
                      &quot;userId&quot;: &quot;hidden&quot;,
                      &quot;sessions&quot;: [
                          {
                              &quot;ani&quot;: &quot;hidden&quot;,
                              &quot;direction&quot;: &quot;inbound&quot;,
                              &quot;dnis&quot;: &quot;&quot;,
                              &quot;edgeId&quot;: &quot;hidden&quot;,
                              &quot;mediaType&quot;: &quot;voice&quot;,
                              &quot;peerId&quot;: &quot;&quot;,
                              &quot;protocolCallId&quot;: &quot;hidden&quot;,
                              &quot;provider&quot;: &quot;hidden&quot;,
                              &quot;remote&quot;: &quot;hidden&quot;,
                              &quot;sessionDnis&quot;:&quot;hidden&quot;,
                              &quot;sessionId&quot;: &quot;hidden&quot;,
                              &quot;metrics&quot;: [
                                  {
                                      &quot;emitDate&quot;: &quot;2022-03-20T18:52:55.468Z&quot;,
                                      &quot;name&quot;: &quot;tAlert&quot;,
                                      &quot;value&quot;: 12000
                                  }
                              ],
                              &quot;segments&quot;: [
                                  {
                                      &quot;conference&quot;: false,
                                      &quot;disconnectType&quot;: &quot;noAnswerTransfer&quot;,
                                      &quot;segmentEnd&quot;: &quot;2022-03-20T18:52:55.468Z&quot;,
                                      &quot;segmentStart&quot;: &quot;2022-03-20T18:52:43.468Z&quot;,
                                      &quot;segmentType&quot;: &quot;alert&quot;
                                  }
                              ]
                          }
                      ]
                  },
                  {
                      &quot;participantId&quot;: &quot;hidden&quot;,
                      &quot;purpose&quot;: &quot;hidden&quot;,
                      &quot;userId&quot;: &quot;hidden&quot;,
                      &quot;sessions&quot;: [
                          {
                              &quot;ani&quot;: &quot;hidden&quot;,
                              &quot;direction&quot;: &quot;hidden&quot;,
                              &quot;dnis&quot;: &quot;hidden&quot;,
                              &quot;edgeId&quot;: &quot;hidden&quot;,
                              &quot;mediaType&quot;: &quot;hidden&quot;,
                              &quot;peerId&quot;: &quot;hidden&quot;,
                              &quot;protocolCallId&quot;: &quot;hidden&quot;,
                              &quot;provider&quot;: &quot;hidden&quot;,
                              &quot;remote&quot;: &quot;hidden&quot;,
                              &quot;sessionDnis&quot;: &quot;hidden&quot;,
                              &quot;sessionId&quot;: &quot;hidden&quot;,
                              &quot;metrics&quot;: [
                                  {
                                      &quot;emitDate&quot;: &quot;2022-03-20T18:53:14.696Z&quot;,
                                      &quot;name&quot;: &quot;tVoicemail&quot;,
                                      &quot;value&quot;: 19022
                                  }
                              ],
                              &quot;segments&quot;: [
                                  {
                                      &quot;conference&quot;: false,
                                      &quot;segmentEnd&quot;: &quot;2022-03-20T18:52:55.674Z&quot;,
                                      &quot;segmentStart&quot;: &quot;2022-03-20T18:52:55.518Z&quot;,
                                      &quot;segmentType&quot;: &quot;system&quot;
                                  },
                                  {
                                      &quot;conference&quot;: false,
                                      &quot;disconnectType&quot;: &quot;peer&quot;,
                                      &quot;q850ResponseCodes&quot;: [
                                          16
                                      ],
                                      &quot;segmentEnd&quot;: &quot;2022-03-20T18:53:14.696Z&quot;,
                                      &quot;segmentStart&quot;: &quot;2022-03-20T18:52:55.674Z&quot;,
                                      &quot;segmentType&quot;: &quot;interact&quot;
                                  }
                              ]
                          }
                      ]
                  }
              ]
          }
  </code></pre>
  <p>The data flow is unable to create a projection for the above JSON. Could any of you please help?</p>