0👍
✅
You’ve defined $output
as a variable in PHP and are trying to use it in JavaScript. That won’t work. Try adding this in your JavaScript:
var object = <?php echo json_encode($object); ?>;
Source:stackexchange.com