Javascript – Use map/reduce to simplify complex array of object
I'm trying to use reduce to take an array of objects and return an object in below expected format. Able to use it to create object based on validFrom but not able to visulize next steps. Tried to use map…