How to aggregate database field in nested array as below json format?

"_index" : "product",
"_type" : "product",
"_id" : "191201",
"_score" : 1.0,
"_source" : {
"styleno" : "191201",
"@version" : "1",
"@timestamp" : "2019-11-20T15:28:07.322Z",
"colors" : "01"
[ {
"sizeno" : "0240",
"ean" : "4059506390524",
"sizecode" : "10"
},
{
"sizeno" : "0230",
"ean" : "4059506391347",
"colors" : "04",
"sizecode" : "9.5"
}],
"colors" : "02"
[ {
"sizeno" : "0240",
"ean" : "4059506390524",
"sizecode" : "10"
},
{
"sizeno" : "0230",
"ean" : "4059506391347",
"sizecode" : "9.5"
}]}