Damit lässt sich eine JSON-Definition in JavaScript direkt mit der eval()-Funktion in ein JavaScript-Objekt umsetzen.
This easy and popular but risky technique exploits JSON's compatibility with the JavaScript eval() function, which is described below.
Wenn mit der Funktion ein JSON-String zurückgegeben wird, kann dieser mit der Methode JSON.parse wieder in ein JavaScript-Objekt umgewandelt werden. Beispiel
If you returned a JSON string from the function, you could convert it back into a JavaScript object using JSON.parse method, e.g.
Es muss in ein natives JavaScript Objekt umgewandelt werden, wenn du auf die Daten zugreifen willst.
It needs to be converted to a native JavaScript object when you want to access the data.
Prüfen, ob ein Schlüssel in einem JavaScript-Objekt existiert?
Examples are used only to help you translate the word or expression searched in various contexts. They are not selected or validated by us and can contain inappropriate terms or ideas. Please report examples to be edited or not to be displayed. Potentially sensitive, inappropriate or colloquial translations are usually marked in red or in orange.