Parses JSON input and yields key-value pairs for all primitive values. Flattens nested structures using dot notation and array indices.
The JSON input as bytes or string
Key-value pairs as [key, value] tuples
const json = '{"user": {"name": "John", "age": 30}}';for (const [key, value] of jsonKeyValueParser(json)) { console.log(`${key}: ${value}`); // Output: "user.name: John", "user.age: 30"} Copy
const json = '{"user": {"name": "John", "age": 30}}';for (const [key, value] of jsonKeyValueParser(json)) { console.log(`${key}: ${value}`); // Output: "user.name: John", "user.age: 30"}
Parses JSON input and yields key-value pairs for all primitive values. Flattens nested structures using dot notation and array indices.