I need to somehow include php inside of a javascript file to get the .json theme path. I have tried this solution in my lottie configuration javascript file:
var electron_path = "<?php echo get_theme_file_uri('js/logo-anim/electron-move.json'); ?>";
var anim = bodymovin.loadAnimation({
container: document.getElementById('logo-anim'),
renderer: 'svg',
loop: true,
autoplay: true,
path: electron_path,
})