How to use CMS Collection fields in embedded code?

I found this information:


here: https://university.webflow.com/lesson/custom-code-embed
that it’s possible to use CMS fields in embedded code. How to do it?
I have a code that creates listing items automatically from Firebase. I imagine, it would be much nicer and easier to use CMS in Webflow.