I propose a new feature, the stopKeys: string[] option.
What does the option do?
Similarly to the stopPaths option, the stopKeys option will exclude all children meeting the specified criteria.
stopKeys allows to define a list of keys that should be detected when parsing the object. If one of the key is found, the parser stops and does not convert the children.
Why do we need this option?
This feature is helpful when we need to convert the keys of an object but want to exclude some keys under a specific parent. In most cases stopPaths can probably answer the need, however when we do not have full knowledge and control over the structure of the object to convert, then it can be difficult to create and maintain the correct paths.
Hi,
I propose a new feature, the
stopKeys: string[]
option.What does the option do? Similarly to the
stopPaths
option, thestopKeys
option will exclude all children meeting the specified criteria.stopKeys
allows to define a list of keys that should be detected when parsing the object. If one of the key is found, the parser stops and does not convert the children.Why do we need this option? This feature is helpful when we need to convert the keys of an object but want to exclude some keys under a specific parent. In most cases
stopPaths
can probably answer the need, however when we do not have full knowledge and control over the structure of the object to convert, then it can be difficult to create and maintain the correct paths.