Warum ich unterschiedliche Ergebnisse zwischen dem Protokollieren von JSON.PARSE zu Konsolen- und Protokollierungsobjekt
Posted: 03 Mar 2025, 02:12
Ich habe eine JSON -Zeichenfolge wie folgt: < /p>
und console.log (json.parse (json)) druckt mich ein Objekt mit $ {first_threshold} Wert in operationsettings.guidelines [0]. und schreiben Sie es in die Konsole wie folgt: < /p>
Dies ist ein React -Projekt mit TypeScript.>
Code: Select all
{
"operationSettings": {
"guidelines": [
{
"standards": {
"thresholdValue": "${first_threshold}"
}
}
]
}
}
Code: Select all
const parsedJson = JSON.parse(json)
console.log(parsedJson)