Skip to content

TypeScript Library for JSON

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

typescriptlibs/tsl-core-json

Repository files navigation

TypeScript Library for JSON

This is a TypeScript-optimized library to handle JSON.

Installation

npm install tsl-core-json

API

JSON.extract

Extracts a path in a JSON object and returns the found portion.

Parameters:

  • json: JSON - JSON object to extract from.

  • path:

    • string - Path in the JSON object to extract.

    • Array<(string|RegExp)> - Path selectors for multiple JSON objects to extract.

Returns:

  • JSON.Type - JSON object or primitive, if path was found.

  • undefined - Void, if path was not found.

Links