Adding array of objects in response payload

In the Handler Script, I have the right hand side payload working, however after making it like the left hand side, the Handler Script failed silently. Does anyone have any idea?