Only the livestock and the spoil of that city Israel took as their plunder, according to the word of the LORD that he commanded Joshua.
We have here an account of the improvement which the Israelites made of their victory over Ai. 1. They put all to the sword, not only in the field, but in the city, man, woman, and child, none of them remained, Jos 8:24.
Commenting on Joshua 8:23-29
Only the cattle, and the spoil of the city, Israel took for a prey unto themselves,.... Even all their substance, as besides their cattle, also their gold, silver, household goods, merchandise, &c. according unto the word of the Lord which he commanded Joshua, Jos 8:2.
Only the cattle and the spoil - In the case of Jericho these were all consigned to destruction, and therefore it was criminal to take any thing pertaining to the city, as we have already seen; but in the case before us the cattle and spoils were expressly given to the conquerors by the order of God. See Jos 8:2.