Javscript - JSON - How to parse an external JSON the correct way : I have an external JSON file 'devices.json'.

    {
    "Android":[
        {"modell":"Samsung Galaxy S9+", "version":"8.0", "formfactor":"smartphone"},
        {"modell":"Google Pixel 2XL", "version":"9.0", "formfactor":"smartphone"},
        {"modell":"OnePlus One+", "version":"7.1.1", "formfactor":"smartphone"},
        {"modell":"Motorola Moto G (3rd Generation)", "version":"6.0.1", "formfactor":"smartphone"},
        {"modell":"Motorola Moto G (1st Generation)", "version":"5.1", "formfactor":"smartphone"},
        {"modell":"Phicomm Clue C230", "version":"4.3", "formfactor":"smartphone"},
        {"modell":"Huawei MediaPad M3 Lite 8", "version":"7.0", "formfactor":"tablet"},
        {"modell":"Xiaomi Mi Pad", "version":"5.1", "formfactor":"tablet"},
        {"modell":"Samsung Galaxy Tab 3 (7.0) Lite", "version":"4.2.2", "formfactor":"tablet"},
        {"modell":"Amazon Fire Tablet 7 (5th Gen)", "version":"Fire OS 5.3.3", "formfactor":"tablet"}
    ],
    "iOS":[
        {"modell":"iPhone 7", "version":"12beta", "formfactor":"smartphone"},
        {"modell":"iPhone 5s", "version":"11.4.1", "formfactor":"smartphone"},
        {"modell":"iPad Air", "version":"11.4.1", "formfactor":"tablet"},
        {"modell":"iPad 3", "version":"9.3.5", "formfactor":"tablet"}
    ],
    "Windows":[
        {"version":"Windows 10"},
        {"version":"Windows 8.1"},
        {"version":"Windows 7"}
    ],
    "macOS":[
        {"modell":"Macbook Air", "version":"10.13.5"}
    ],
    "Linux":[
        {"version":"Mint"},
        {"version":"Kubuntu"},
        {"version":"elemetaryOS"},
        {"version":"openSUSE"},
        {"version":"CentOS"},
        {"version":"Fedora"},
        {"version":"Oracle Linux"},
        {"version":"Red Hat"}
    ]
}

Now I want to parse this with a button click and have an output like this:

> Samsung Galaxy S9+ (Android 8.0), Google Pixel 2XL (Android 9), OnePlus One etc...

I don't really know how to parse the JSON the best way.

Something like this?

    <script>
       function getArray(){
        return $.getJSON('devices.json');
    }
    
    getArray().done( function(json) {
        console.log(json); // show the json data in console
    
        // Android
        for(var i = 0; i < json.Android.length; i++) {
            var obj = json.Android[i];
    
            console.log(obj);
        }
        
        // Android
        for(var i = 0; i < json.iOS.length; i++) {
            var obj = json.iOS[i];
    
            console.log(obj);
        }
        
    });
    </script>

Thanks in advance