3 ms·
The only thing I miss when using json are the css selectors when trying to find data in a nested structure. With json I have to resort to imperative means and
by binspace 17y ago
The only thing I miss when using json are the css selectors when trying to find data in a nested structure.
With json I have to resort to imperative means and care about the middle layers. That means refactorings are more likely to break software.
Fundamentally there is no reason why json cannot have it's own selector which traverses the tree. There just isn't one that I know of though.
- jerf 17y agoActually, it's really easy to write, if you want to. I haven't had any need in my big JSON project (everything ends up pretty hierarchial so any query like "give me all the object attributes that are 'xyz'" isn't useful), but if I needed one it would be easy to write. A good learning exercise for recursion, if you're not familiar with it.