This is how A. W. Pink interprets God's foreknowledge, and I agree with him.
Foreknowledge of God (in election)
Arthur W. Pink (1886-1952)
According to A. W. Pink, many in the church are ignorant of the Scriptural meaning of foreknowledge. Because of this ignorance, it is easy for unlearned teachers to spread erroneous doctrine. The most common error is the following: in opposition to the clear teaching of Scripture that God sovereignly chose certain people for salvation, these teachers argue that God, in His “foreknowledge,” looked into the future and saw that certain people would believe—and so predestined them to salvation. This turns Scripture on its head, making man the final arbiter of his salvation rather than God. In repudiating this error, Pink explains the true meaning of foreknowledge as taught in Scripture, showing that it is “never used in connection with events or actions, but always refers to persons.” It is individual people that God is said to foreknow, not the actions of those people.