You are thinking correctly for your requirement. What you can do is, use the read method for each entityset to read the oData. In the success callback for this method, you can parse the result objects into a corresponding JSON model.
Now, you can have working logic as per which: