how to access elements in json with javascript

I have a Json-file which looks as follows:

 {
"types": [
        {
            "bc-0001": "Großhandel Medizinisches Verbrauchsmaterial",
            "ti-0001-0001": "STask 1"
        },
        {
            "bc-0002": "Spielgeräteproduzent",
            "ti-0001-0002": "STask 2"
        },
        {
            "bc-0003": "Onlineversandhändler",
            "ti-0001-0003": "STask 3"
        }
    ]
}

Assuming the entire entries are unknown, except types. now my question is: how can I access the entries separately? For instance, how can I access "bc-0003" and then how can I access "Onlineversandhändler" ? Thanks very much in advance!



Read more here: https://stackoverflow.com/questions/64902118/how-to-access-elements-in-json-with-javascript

Content Attribution

This content was originally published by deppensido at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: