Hi @TIANSHU LIN Welcome to Microsoft Q&A and thank you for posting your questions here!
To understand your question, you would like to flatten Complex Nested JSON structure that is not an Array in Azure Data Factory.
Most of all, to flattens a complex JSON object, you can use the JSON Flatten tool to normalize and flatten complex JSON objects by key name. The object can be ordered alphabetically, either ascending or descending (reversed). The online utility can be used for unflattening or flattening deeply nested JSON objects.
You can also use the flatten_json package which can be installed with pip install flatten-json. This package provides a function that takes a nested JSON object and returns a flattened dictionary.
You can use the two links below to see an examples from similar question here:
https://www.coderstool.com/flatten-json
Now, to flattens a complex nested JSON structure that is not an array in Azure Data Factory, you can use the Select activity and delete all nested arrays. Then, for each nested array, use a select activity and select the nested data, not the array itself.
Similar question has been answered in the past on this platform, you can read more here: https://learn.microsoft.com/en-us/answers/questions/931931/how-to-flatten-a-complex-nested-json-structure-in
You can also use Python to flatten multilevel/nested JSON. You can use the flatten_json library and concatenate keys (e.g. with dot as separator) like {‘a’: {‘b’: 1}} -> {‘a.b’: 1}
There is a resource from Microsoft Document Library for Flatten transformation in mapping data flow in Azure Data Factory and many others from this link: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-flatten
I hope this is helpful.
Regards,
Sina