I am building a react application that gets data from Firestore. I am stuck with getting values from a Key: value pair in which the key is more than one word.
I create my component like so:
const MyComponent = ({theData}) => {
return (
<div>
<p>theData.name</p>
<p>theData.Special Pass</p>
</div>
)
}
The first one with the "Name" works fine and I can view the value. I am stuck on the second one. I have tried:
theData.["Special Pass"}
theData.{"Special Pass"}
and several other variations without success. Please assist.
Thanks