now there are many arrays like this
{"content":{"productId":112640,"name":"H480g","images":["1.jpg","2.jpg","3.jpg"],"price":"33.50","brandId":5280,"brandName":"","cateId":689,"cateName":"","cateIdLevel2":686,"cateNameLevel2":"","cateIdLevel1":685,"cateNameLevel1":""}}
where
cateIdLevel1 is the first-level classification ID corresponding name cateNameLevel1
cateIdLevel2 is the second-level classification ID corresponding name cateNameLevel2
cateId is the third-level classification corresponding name cateName
now the final array that you want to achieve is
first-level classification, second-level classification, second-level classification, third-level classification, third-level classification, and these goods are in the third-level classification.
because of the large amount of data, how to implement it with the least amount of computation?