Passage
(It was that Mary which anointed the Lord with ointment, and wiped his feet with her hair, whose brother Lazarus was sick.)
(It was that Mary which anointed the Lord with ointment, and wiped his feet with her hair, whose brother Lazarus was sick.)
John 11:1 Now a certain man was sick, named Lazarus, of Bethany, the town of Mary and her sister Martha.
John 11:2 (It was that Mary which anointed the Lord with ointment, and wiped his feet with her hair, whose brother Lazarus was sick.)
John 11:3 Therefore his sisters sent unto him, saying, Lord, behold, he whom thou lovest is sick.
John 11:4 When Jesus heard that, he said, This sickness is not unto death, but for the glory of God, that the Son of God might be glorified thereby.
The verse centers on "mary", "anointed", "lord", "ointment", "wiped", "feet", "hair", and "whose". It is saying that the verse draws attention to "mary" and "anointed", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 1's "Now a certain man was sick named..." into verse 3's "Therefore his sisters sent unto him saying...", so "mary" and "anointed" belong inside that flow. In John context, the local focus is the identity of Jesus, new birth, eternal life, and belief and unbelief.
A plain takeaway is to answer the verse's own emphasis on "mary" and "anointed" with trust shaped by these words, not by a vague optimism outside the passage.