0

I have the following JSON object:

{   
"features": [{      
    "properties": {
        "lat": "1.2345",
        "location c": "aaa",
        "location q": "cccc"
    }
    }
 ]
} 

So I can fetch properties and what next?

As you see above mentioned fields have 2 words.

 var location_c =  properties.get(/*???*/);

How can I do that in JavaScript?

Cody Gray
  • 230,875
  • 49
  • 477
  • 553
Maxim Shoustin
  • 78,004
  • 28
  • 199
  • 222
  • 1
    [There's no such thing as a JSON object.](http://benalman.com/news/2010/03/theres-no-such-thing-as-a-json/) – nnnnnn Jun 04 '13 at 14:38

1 Answers1

8

Use bracket syntax.

 var location_c = properties['location c'];
nderscore
  • 4,112
  • 19
  • 29