How to structure nested objects into an array of objects

welcome to shbcf.ru