Checks if a value is a JSON object.
A valid JSON object is defined as an object with string keys and valid JSON values.
The value to check.
True if obj is a JSON object, false otherwise.
obj
isJSONObject({ nested: { boolean: true, array: [1, 2, 3], string: 'test', null: null } }); // trueisJSONObject({ regexp: /test/ }); // falseisJSONObject(123); // false Copy
isJSONObject({ nested: { boolean: true, array: [1, 2, 3], string: 'test', null: null } }); // trueisJSONObject({ regexp: /test/ }); // falseisJSONObject(123); // false
Alias