Allows you to build JSON tree from SQL-query result (or any custom data array) on PHP