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 - on strike
  • 239,200
  • 50
  • 490
  • 574
Maxim Shoustin
  • 77,483
  • 27
  • 203
  • 225
  • 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,182
  • 22
  • 29