I can't figure out what this function does.  It looks like it takes an object with properties names that are numbers and converts to an object with property names that are strings, or maybe the other way.  But I don't know if tag is the number or if tagInfo.key is the number.

If you don't just drop all the strings, then maybe a naming convention where you always use tagName and tagNum or something to distinguish the two cases.