Page 1 of 1

Warum ich unterschiedliche Ergebnisse zwischen dem Protokollieren von JSON.PARSE zu Konsolen- und Protokollierungsobjekt

Posted: 03 Mar 2025, 02:12
by Anonymous
Ich habe eine JSON -Zeichenfolge wie folgt: < /p>

Code: Select all

{
"operationSettings": {
"guidelines": [
{
"standards": {
"thresholdValue": "${first_threshold}"
}
}
]
}
}
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>

Code: Select all

const parsedJson = JSON.parse(json)
console.log(parsedJson)
Dies ist ein React -Projekt mit TypeScript.>