My json code:
var jsontest = {
"testlang": "no no testlang dziala lol"
}
i want get "testlang" by variable, eg:
var variabletest = "testlang";
jsontest.variabletest
can anyone help plz?
My json code:
var jsontest = {
"testlang": "no no testlang dziala lol"
}
i want get "testlang" by variable, eg:
var variabletest = "testlang";
jsontest.variabletest
can anyone help plz?
In this case the below would work
const jsontest = {
"testlang": "no no testlang dziala lol"
}
const variabletest = "testlang";
console.log(jsontest[variabletest])