1 John 3:19-24
19 (Now) this is how we shall know that we belong to the truth and reassure our hearts before him
20 in whatever our hearts condemn, for God is greater than our hearts and knows everything.
21 Beloved, if (our) hearts do not condemn us, we have confidence in God
22 and receive from him whatever we ask, because we keep his commandments and do what pleases him.
23 And his commandment is this: we should believe in the name of his Son, Jesus Christ, and love one another just as he commanded us.
24 Those who keep his commandments remain in him, and he in them, and the way we know that he remains in us is from the Spirit that he gave us.
-------------------
God knows the hearts and answers the prayers of the faithful people. We are to come to him in confidence and faith. If we have truly sought him and his righteousness, and our hearts have not betrayed us, we will receive from him whatever we ask.
The trick here is "if our hearts do not condemn us." I think there are a couple of ways that this happens. Our hearts condemn us by clinging to the world, instead of converting to the life in the spirit that I’ve been talking about lately. We are very much attached to the flesh, and it is difficult to cast it away. God of course sees this happening, and those thoughts betray us.
Our hearts also condemn us by not having enough faith. See the passage from Matthew below:
Matthew 17:14-20
14 When they came to the crowd a man approached, knelt down before him,
15 and said, "Lord, have pity on my son, for he is a lunatic and suffers severely; often he falls into fire, and often into water.
16 I brought him to your disciples, but they could not cure him."
17 Jesus said in reply, "O faithless and perverse generation, how long will I be with you? How long will I endure you? Bring him here to me."
18 Jesus rebuked him and the demon came out of him, and from that hour the boy was cured.
19 Then the disciples approached Jesus in private and said, "Why could we not drive it out?"
20 He said to them, "Because of your little faith. Amen, I say to you, if you have faith the size of a mustard seed, you will say to this mountain, 'Move from here to there,' and it will move. Nothing will be impossible for you."
Christ rebukes the disciples for not believing in the spiritual power that he has given to them. They didn’t think they could cast out demons. The truth is that they could, and that we can too.