Please help with the below transformation
Input :
[{"id":1,"sub":["tamil"]},{"id":2,"sub":["english","maths"]},{"id":3,"sub":["phy","che"]}]
Output:
[
{"id":1,"sub":"tamil"},
{"id":2,"sub":"english"},
{"id":2,"sub":"maths"},
{"id":3,"sub":"phy"},
{"id":3,"sub":"che"}
]```