$_POST
An associative array of variables passed to the current script via the HTTP POST method when using application/x-www-form-urlencoded or multipart/form-data as the HTTP Content-Type in the request.
-JOIN Attr a ON a.attr_id = js.`child`;
+JOIN Attr a ON a.id = js.`child`;
SELECT `table1`.*, `table2`.*
FROM `table1`
JOIN JSON_TABLE(`table1`.`json`, '$.*' COLUMNS(`child` INT PATH '$')) AS `tt`
JOIN `table2` ON `table2`.`id` = `tt`.`child`
И Nested Set, и Materialized Path позволяют выбрать узел со всеми потомками одним условием. Вот для Nested Set:
Для Materilized Path можно в документе хранить кроме nodeId поле nodePath, тогда к таблице узлов можно не обращаться
Хотя, если узлов мало, то и Adjacency List можно использовать с рекурсивным CTE.