Learning JSX here and I was wondering if theres a way to check if a value appears in a object in JavaScript
i.e We have an obj: anObj ={ myFoo : "MONDAY;TUESDAY;WEDNESDAY" }
How could I check if monday etc appears in this object?
Learning JSX here and I was wondering if theres a way to check if a value appears in a object in JavaScript
i.e We have an obj: anObj ={ myFoo : "MONDAY;TUESDAY;WEDNESDAY" }
How could I check if monday etc appears in this object?
You can find the value in Object.values with .includes()
let valueExists = Object.values(obj).includes("value you looking for");