trekiej is correct. It's a moth catapillar commonly known as an
inch worm. Have you never heard the Hans Christian Andersen song:
"Inch worm, inch worm, measuring the marigold. etc."
And yes, the bits in the jar are what you suspect. What goes into a catapillar, comes out. Just like you and me.
TC