As you’ve read, sentences may contain a direct object as an indirect object.

Sentences with a direct object consist of subject + verb + direct object. To find the direct object, ask who or what after the verb.

Example: Peter rings the school bell.

The subject is “Peter” and the verb is “rings”. Who or what does Peter ring? The school bell – this is the direct object.

To find the indirect object, ask to whom/what, or for whom/what after the direct object.

Example: Jansie tells a joke to her father. The subject is “Jansie”, the verb is “tells” and the direct object is “a joke”. To whom or for whom does Jansie tell a joke? Her father – this is the indirect object.

Note, the indirect object often comes before the direct object, and so can be hard to identify. It is easy in the earlier sentence to find the indirect object:
Jansie tells a joke to her father.
However you can say it differently that makes it harder to spot:
Jansie tells her father a joke.
But this does not change the fact that “Her father” is the indirect object, even though it comes before the direct object, “a joke”.

So to summarise: to find indirect or direct objects, first find the verb of the sentence. Then ask the question who or what after the verb – this is your direct object. Then ask for what/whom, or to what/whom. If you have an answer to that question, you have the indirect object.

(Not all sentences have objects, direct or indirect.)