How to convert pyspark data frame structure into a nested json array with multiple occurances
How to convert a pyspark data frame like below to a json array structure OrderID field fieldValue itemSeqNo 123 Date 01-01-23 1 123 Amount 10.00 1 123 description Pencil 1 123 Date 01-02-23 2 123 Amount 11.00 2 123 description…