janhommes / o.js

o.js - client side oData lib.
https://janhommes.github.io/o.js/example/
MIT License
241 stars 58 forks source link

expand multiple levels #42

Closed datoulei closed 7 years ago

datoulei commented 7 years ago

How to build like this: Products/?$expand=ProductUnit($expand=ProductPrice)

janhommes commented 7 years ago

As I wrote this lib there was no multi expand support. If your endpoint supports it, o.js can query it in the following way:

o('http://localhost/Products/?$expand=ProductUnit($expand=ProductPrice)').get()

Not tested, but should work!

janhommes commented 7 years ago

No feedback if it's work. Assuming so -> closed.