Does anyone know how i can grab a js object key that is in two words like:
“Category 1”:
“Category 2”:
I can’t seem to get around that space between the two.
Any thoughts would be grand, thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What do you mean object key?
If you mean an object property, then you can access Javascript object properties much like you do with arrays.
.. so you can access “Category 1” using
obj["Category 1"].