How to copy json data in specific format from one file to another

Hello,

I have data in below fasion in json input file.
1 ] There will be one TestExcKey in file and will occure 1 or more times and under testExcKey , TestKey will be there which will be different every time and some data will be there that wil also chnage with TestKey like executedby , defects , start …
2] I need to arrange data with respect to standard file , as mentioned above TestExcKey will be same but occuring one or more time and that TestExckey we need to put only one time according to standard format.
3 ] Once key is updated rest of the data with testKey we need to write one by one with sequence of standard file format.
4] Expected output i have written in extected output file.

please find files below .
Expeccted result.json (1.2 KB)
Input file.json (1.1 KB)
Standard format.json (847 Bytes)

help me to achieve this, if you have any doubt regarding the requirement please update.