JS Reduce and group JSON by deeply nested object
问题 I'm pulling via REST a JSON with an array of objects with some fields and some nested objects. What I'm trying to create is a grouped summary object from the array of nested JSON objects with the following structure: var data = [ { "Id": 79, "Date": "2019-02-17T00:00:00-07:00", "StartTime": 1535385600, "EndTime": 1535416200, "Slots": [ { "blnEmptySlot": false, "strType": "B", "intStart": 3600, "intEnd": 5400, "intUnixStart": 1535389200, "intUnixEnd": 1535391000, } ], "OperationalUnit": 3,