converts lesson into json and embeds it on html