0

i have a object like the following

{"7036":{"7073":"","7075":"","7077":"","7079":"2","7352":"3"}

How do i read the value of 7352 if that's the only information i have?

For ex: i want to get the value of 3 and in my code i can get the value of 7352

1 Answer 1

1

var json = '{"7036":{"7073":"","7075":"","7077":"","7079":"2","7352":"3"}}';
var obj = JSON.parse(json);
for(var k in obj) {
  var innerObj = obj[k];
  for(var item in innerObj) {
    console.log(item);
    console.log(innerObj[item])
  }
}

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.