Fix nodes formatting in JSON response