0

Is it possible to use string act as json key?

Something like this. Many thanks.

var json=await fetch(abc.com) // a json is returned
var justARandomString='jbbwjvbj' // Assume whatever the string value is
var val=json.justARandomString // justARandomString is the variable declared in line 2, but not the key name itself
Andy
  • 1

0 Answers0