“ jsonValueKey() ”

		
        let jsonString = '{"name": "nadia", "age": 54, "city": "Mars"}';
        let key = "city";

        function jsonValueKey(jsonString, key) {
            let json = JSON.parse(jsonString);
            return json[key];
        }

        // Affichage console
        console.log(jsonValueKey(jsonString, key)); // affichera "Mars"
        // Affichage HTML
        let output = jsonValueKey(jsonString, key);
        document.getElementById("output").innerHTML = output;