JSONLab now supports JSON Path syntax for slicing complex struct parsed from NeuroJSON.io data #10
fangq
started this conversation in
NeuroJSON JSON format specifications and parsers
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have refined the early implementation of JSON Path support, and now it can handle scan operator
..
and one can perform flexible search of values inside a hierarchicalstruct/cell/containers.Map
object (such as those parsed from NeuroJSON.io datasets).For example, for a struct
we can list all
price
subfield usejsonpath(data, '$..price')
, list allbook.author
subfields asjsonpath(data, '$.book..author')
; or the full information for the 1st book asjsonpath(data, '$.book[0]')
.Because JSONLab is portable, this feature is supported in both MATLAB and Octave.
here are some examples
for MATLAB
for Octave
Beta Was this translation helpful? Give feedback.
All reactions