How to engage in battle. The priest speaks to the army; the officers release any with certain obligations or who are fearful. Offer peace to a city, first. If they accept, let them serve you. If not, kill all the men and keep the rest as plunder. In Canaan, though, destroy all that breathes, as their punishment for idolatry and to keep you from falling into it. Don't cut down trees when the seige of a city is long.
When you have an unsolved murder, the elders of the nearest city make atonement with a heifer. When you take a woman captive as plunder, let her mourn for a month before going in to her. If you don't want to keep her, don't treat her as a slave. The firstborn gets the inheritance, regardless who your favorite child is. Parents should take rebellious children who won't repent to the elders, and he will be stoned. If you execute someone by hanging, don't keep them on it overnight, since that is a cursed punishment.
Help your neighbor and animals maintain his stuff and life. Don't cross-dress. Don't mix different kinds of seeds, cloth and animals in work. If a new groom publicly accuses his wife of not being a virgin at their wedding (!), the elders will examine the wedding bedsheets to see if it is so. If not, the man is whipped, fined and stuck with her. If it's true, she is stoned. Execute adulterers, both man and woman, unless the woman cried for help and no one could hear. Sex before marriage means a heavy fine to the father of the girl, and they get married and stay married.
How this is about Jesus!
Every knee will bow to Jesus. If it's unwilling submission, condemnation & spiritual death results.
In John 8, Jesus does not allow carrying out the penalty as described here. Not because it is an unfair or brutal law - it is not. But they accuse hypocritically, and Jesus advocates a transformation of the penalties of the law. Instead of capital punishment, God's people now use excommunication - a pronouncement of spiritual death - for unrepentant and high-handed sins.