An excellent article at Stand To Reason goes in-depth on Exodus 21:22.
In short, God’s law treats the unborn child with equal rights of any human.
“And if men struggle with each other and strike a woman with child so that the child comes forth, yet there is no injury, he shall surely be fined as the woman’s husband may demand of him; and he shall pay as the judges decide. But if there is any injury, then you shall appoint as a penalty life for life….”
The author makes this interesting note too:
“A few verses later (v. 32), Moses imposes a fine for the death of a slave, but this doesn’t mean the slave is sub-human.”
I pray that one day, humanity will realize that abortion is just as wrong as slavery – that all of humanity have equal rights.