Thanks for the reply.
My expected result is like
Btw, based on my first code will not group yet, is it possible to transform the top-level array [] to object {}?Or just remove the top-level [].
My expected result is like
{ "name": "john", "email": "example.com", "items": [ { "phone": "123", "info": { "date": "26/11/18", } }, { "phone": "123456", "info": { "date": "12/08/18", } }, ] }The other value will insert according to the name. I will try to refer your method.
Btw, based on my first code will not group yet, is it possible to transform the top-level array [] to object {}?Or just remove the top-level [].