at first please see image then, how can use for example:
use this humans.body."name"
instead of this humans.body.name
? is there any way to solve that?
my codes:
//this is my file
let fileJson = {
status: 200,
result: {
author_id: "137",
text: "1281ms",
author: "Ctrl+Z",
},
};
let data = [{id: 1, key: "author_id"}];
console.log(fileJson.result.author_id); //output: 137
console.log(data[0].key); //output: author_id
console.log(fileJson.result.data[0].key); //output: Uncaught TypeError ...
//how can solve this error?
thank you :)