-1

I want to retrieve a JSON value dynamically from JSON object. Below is the code i am using to get the value from JSON object.

var jsonObj = JSON.parse(jsonData);
console.log(jsonObj);
jsonSplit = jsonToFind.split(htmlSplit+".")[1].trim();
console.log(jsonObj+"."+jsonSplit);

But I am getting [object Object].ensighten_tag. Here ensighten_tag is the dynamic key value.

Can anyone suggest me how to get the value dynamically ?

Srinivas B
  • 1,821
  • 4
  • 17
  • 35

1 Answers1

0
console.log(JsonObj[jsonSplit])
Andreas Møller
  • 839
  • 5
  • 9