I have an object
const data={a:'value1',b:{c:'null'}}
Now when I try to access 'c', I get 'undefined' but I am getting 'b'. I tried accessing like this:
console.log(data.b) returns {c:'null'} but
console.log(data.b.c) returns undefined
I have an object
const data={a:'value1',b:{c:'null'}}
Now when I try to access 'c', I get 'undefined' but I am getting 'b'. I tried accessing like this:
console.log(data.b) returns {c:'null'} but
console.log(data.b.c) returns undefined
Copyright © 2021 Jogjafile Inc.
Use this
It will resolve your problem.
Update: In vue components, sometimes you are not able to fetch nested object like this
so you have to use this strategy to access nested object attribute. like this