The Hobbit, with its Battle of Five Armies, is 1937; but I don't know if this influenced Anderson.Poul Anderson has elf and troll kingdoms capable of organizing into armies and making war in The Broken Sword (1954), and in a more Chainmail-style assorted army form implied in Three Hearts & Three Lions.