jaxon icon indicating copy to clipboard operation
jaxon copied to clipboard

Just to understand how to use it correctly

Open tiagodavi opened this issue 5 years ago • 2 comments
trafficstars

Thank you for the library.

I am wondering how to slice the json?

I tried Jaxon.Stream.query(Jaxon.Path.parse!("$[0:3].Player")) to get first 3 players I have, but it does not work.

How can I use it correctly to get only partial data and filters?

Should I use Enum.take?

tiagodavi avatar Mar 03 '20 02:03 tiagodavi

This library doesn't seem to support array slicing currently. $[*].Player would for example work, but give you all entries. If you want to know more about what's supported and what not you could try https://cburgmer.github.io/json-path-comparison/.

cburgmer avatar Mar 03 '20 09:03 cburgmer

Thank you @cburgmer

tiagodavi avatar Mar 03 '20 12:03 tiagodavi