我有数据库表,如何创建嵌套的json ..请帮助..!
id, menu_title, menu_page, menu_id, project_id, createdAt, updatedAt
'1', 'How to Login', NULL, NULL, '1', '2019-05-23 13:17:27', '2019-05-23 13:17:27'
'2', 'How to get Password', NULL, NULL, '1', '2019-05-23 13:17:35', '2019-05-23 13:17:35'
'3', 'view timesheet', NULL, '1', '1', '2019-05-23 13:17:35', '2019-05-23 13:17:35'
'4', 'add notifications', NULL, '3', '1', '2019-05-23 13:19:27', '2019-05-23 13:19:27'
'5', 'salary calculations', NULL, '1', '1', '2019-05-23 13:19:35', '2019-05-23 13:19:35'
'6', 'Login add payments', NULL, '4', '1', '2019-05-23 13:19:27', '2019-05-23 13:19:27'
'7', 'Get employee detail', NULL, '4', '1', '2019-05-23 13:19:35', '2019-05-23 13:19:35'
'8', 'abc', NULL, '6', '1', '2019-05-23 13:19:35', '2019-05-23 13:19:35'