Function: isRecord()
isRecord(
value):value is Record<string, unknown>
Narrow value to a plain (non-array) object. Use as a type guard
before indexing into / mutating parsed JSON so the access is
type-safe.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”value is Record<string, unknown>
Example
Section titled “Example”if (isRecord(parsed)) parsed.foo = 1;