Herod the king discovered popularity with certain Jews by killing Christians, and so "he killed James the brother of John with the sword" (Acts 12:2). Peter was next, but it was not to be. God intervened; "an angel of the Lord stood next to him, and a light shone in the cell. He struck Peter on the side and woke him, saying, 'Get up quickly.' And the chains fell off his hands" (Acts 12:7). Peter was led past sleeping guards and open gates and deposited outside the jail and inside the city.
It is a fair question to ask, why was Peter rescued and not James? Why one and not the other, why not both or neither? I do not know the answer to this, but I do know that neither was more important to God, nor more loved by God, because death is no worse a fate than life to the faithful, and both rest in the hands of God.
Perhaps due to the death of James, when Peter was taken, "earnest prayer for him was made to God by the church" (Acts 12:5). Yet, when the servant girl told the disciples that Peter was outside the door, safe and unharmed, their response was a faithless "You are out of your mind" (Acts 12:15). Then they opened the door and were amazed.
Pray and have faith, and if you find faith difficult, pray anyway.
Father God, I know that You are faithful and true. I know that You can do all things. I know that what You promise will happen.
God, I have faith. Help me with my faith. May I trust You and live my life reflecting my faith and confidence in You. When I pray, may I not be amazed that You answer, but how You answer.