Determines if the specified object has the specified value
The object to check.
Optional
Whether to throw instead of returning a value upon failure.
The value to find.
true if property was found, false otherwise.
// Check if object has fieldif (json_has_value({obj: obj, value: "id"})) { // Do your processing}// Throw if not expectedjson_has_value({obj: obj, value: "id", should_throw: true}); Copy
// Check if object has fieldif (json_has_value({obj: obj, value: "id"})) { // Do your processing}// Throw if not expectedjson_has_value({obj: obj, value: "id", should_throw: true});
Determines if the specified object has the specified value