Recursively parses a JSON string or object, handling nested arrays and objects, and returns the parsed result.
Install the package:
# pnpm
pnpm add @unmilley/deep-parse-json
# yarn
yarn add @unmilley/deep-parse-json
# npm
npm install @unmilley/deep-parse-json
Import:
import { deepParseJson } from "@unmilley/deep-parse-json";
const data: SomeType = {
/*...*/
};
const deepParsed = deepParseJson<SomeType>(JSON.stringify(data));
local development
MIT. Made with 💛