Change TOC Subheadings to single line, comma separated
Hi all.
I've been struggling with this for a while now. I am trying to create an automatically generated Table of Contents (TOC).
The TOC has the section headings and subheadings as I want them. However, I want my subheadings to be displayed on one line, separated by commas and no page numbers. I have tried things with running headers and using a text frame with a paragraph style that would be included in the TOC. But none of that works.
This is how it currently looks:
As you can see, the TOC is way too long, and I do not need to have the page numbers for the subheadings, but I want them displayed in the TOC. It would work best for me if they are simply on one line separated by commas.
Is this at all possible using a script? Thanks for helping me

