access to the collections object and json datas from javascript file with eleventy
I’m a very beginner in eleventy. And also in English !
I’m studying alone. I have an html page gallery.html with a dropdown menu. I have a javascript file that will add some html content dynamically depending on the item selected in the dropdown menu.
In the js file that is src/js I want to access to a collection object that I created in .eleventy.js named portraits. But i don’t know how to to it.
In the js if I write collections.portraits, if I start, collections object is not known.