Verifique se a chave existe no JSON TypeScript
if (cell.hasOwnProperty('Relationships')) {
console.log("Key Found!!");
}
else {
console.log("Not Found.");
}
Witty Wolf
if (cell.hasOwnProperty('Relationships')) {
console.log("Key Found!!");
}
else {
console.log("Not Found.");
}
!("key" in obj) // true if "key" doesn't exist in object
!"key" in obj // ERROR! Equivalent to "false in obj"
JSON.stringify(JSONObject).includes("dog")