We might be inclined to believe that the Fourth Gospel primarily supplied the contextual literary background for Justin Martyr's Logos notion. However, Peter R. Forster has argued that the scholarly world is uncertain whether Justin depended on the Fourth Gospel at all. He argues that Justin's ideas of the Logos are informed by "Stoic and Platonic terms, with Stoic monism to a degree softening Platonic dualism." There appears to be a number of ideas at work in Justin: the Stoic Logos combined with the Platonic World-Soul possibly informed by late Judaic notions of the Word or Hokhmah/Sophia.
See Peter R. Forster, “Divine Passibility and the Early Christian Doctrine of God,” in The Power and Weakness of God: Impassibility and Orthodoxy, edited by Nigel M. de S. Cameron (Edinburgh: Rutherford House Books, 1990), 29.