I live in the Middle East and have acquired my English skills orally and from experience rather than academically, and there's a certain structure that English-speaking people in my vicinity use often.
In a sentence like:
'John was troubled by something but I didn't know what it was/what was it.'
From experience, I feel that 'what it was' is correct but I don't know why and most nonnative speakers would use the other construction. Can somebody explain or at least tell me what topic in a grammar book would deal with this kind of structure so I could read about it?
Best Answer
The correct form would be
English usually forms sentences with a subject-verb-object structure, as in your first clause:
The second clause is a little more complex:
"what it was" here is an adjunct clause with "what" as a subordinate conjunction, which modifies the matrix clause "I didn't know".
Note that if you were to turn this into a question, you would use subject-auxiliary inversion:
(Disclaimer: there are a number of grammatical topics covered here and it's almost certain that I've made a mistake somewhere along the line, so please feel free to edit the answer or comment pointing out anything I haven't explained properly).