I have one javascript array got from back end api, for convenience, need to be sort into the form of below, described as final target.
But I don\'t know how to start. Any