'I learned [x] in [y]' would mean that [x] was a specific experience or learning point in [y]. For example, if you studied programming at college you would say you learned programming "in" college.
'I learned [x] through [y]' means that [y] was a route to your learning - that you perhaps learned [x] as a consequence of experiencing [y]. For example, you might say "I learned compassion through my work with disadvantaged people". The work wasn't actually a structured lesson in compassion, but it was something you learned along the way.
Your example works better with "through", because you learned something as a consequence of working. You were there to work, not learn specifically, but you learned via that work.