check if object contains a value js code example Example: check if field exists in object javascript if ('field' in obj) { }