0

I am trying to fetch value from my Json file

let str = "awes123";
      console.log(`code value codeValueStorage  <<`, codevalues.str);

And this is the JSON file codevalues.json

{
    "awes123": "1",
    "qwe123": "2",
    "aws142": "3",
    "cxz132": "4"
}

how can I access the value 1 from JSON from using codevalues.str considering that str = "awes123" please help guys I don't know what to do here.

0 Answers0