I created a theorem command defining example sections, definitions, etc. the same way like so
\newtheorem{example}[thm]{\protect\examplename}
Of course, the numbering of this is consistent with the numbering of every other theorem command. For example, currently I would have something like this for the first section of the paper
Definition 1.
Definition 2.
Example 3.
But what I want is for the examples to be numbered independently by its section number and subsection (or even just by its section. As long as the numbering starts over from 1), like this
Definition 1.
Definition 2.
Example 1.1