I have a (nested) data structure containing objects and arrays. How can I extract information, that is, access specific or multiple values ββusing a known key?
For instance:
var data = { code: 42, items: [{ id: 1, category: [{ cId: 1, prodname: 'foo', quality: [{ qId: 012, testName: 'micro' }, { qId: 013, testName: 'nano' }] }, { id: 2, prodname: 'bar' }] }] };
How do I access the quality key?
Note This is an example of a JSON object; an object is dynamically generated; this is an unknown depth.
source share