https://www.npmjs.com/package/jmetaHey allI have been working with a lot of JSON data recently and ran into some problems that involved understanding paths to data better and wound up creating a small library akin to some of the JSON parsing libraries out there but more lighter to the task. This library will recursively walk entries (depth first) through objects/arrays and record all found keys along with a depth and path into a Map object.This map can be directly accessed, or if you want something simpler, has some functions for getting path/keys as an array in lieu of returned iterators from the map (with some filtering options).One of the big things I wanted was lodash get/set support from the paths which this library accomplishes, hopefully this is helpful to some of you out there. Would love to hear some feedback on it.
Submitted November 05, 2019 at 11:08PM by tsm_rixi
No comments:
Post a Comment