How to display JSON having spaces on keys in React.js

Hello People, I’m start to learn React and I’m tryng to consume a Stock Market API, so I received a JSON like this:

 "Meta Data": {
        "1. Information": "Daily Prices (open, high, low, close) and Volumes",
        "2. Symbol": "IBM",
        "3. Last Refreshed": "2020-12-04",
        "4. Output Size": "Compact",
        "5. Time Zone": "US/Eastern"
    "Time Series (Daily)": {
        "2020-12-04": {
            "1. open": "123.9700",
            "2. high": "127.3800",
            "3. low": "123.6400",
            "4. close": "127.2000",
            "5. volume": "5522760"
        "2020-12-03": {
            "1. open": "124.1600",
            "2. high": "124.8600",
            "3. low": "123.2900",
            "4. close": "123.6100",
            "5. volume": "4548161"

How to use map to display this data on a component??

Nitpicking, but I think the distinction is important to understand: it isn’t JSON, it’s JavaScript at this point – JSON is the format the data is transferred in, but once you’ve parsed it (which is necessary to use it), it’s a JS object.

There are two ways to access object properties in JS.

Clearly, as you’ve found, myStockMarketData.Meta Data (ie dot syntax) won’t work.

So if you cannot use dot syntax, what can you use?