simply if you have json called anything like obj1 you can access to it is properties easily obj1.propery name for eaxmple:
bar obj1 = {
a: 'test value 1',
b: 'test value 2'
}
you can access to a directly by typing obj1.a it will return "test value 1"
but if it was an other object contains other properties like this:
var obj2 = {
a : {
var1: 'var1 value',
var2: 'var2 value'
},
b : {
var1: 'var1 value',
var2: 'var2 value'
},
c: 'c value'
}
you can access to C -> obj2.c but what about A
you can access it by typing obj2.a it will return object but if you want access to it is preoperties you can write
obj2.a.propertyName // like obj2.a.var1 will return var1 value
and if it was array like your example you can access to your requested properties
myobj2.apples // will return apples as object
myobj2.apples.c // will return apples.c as normal string
myobj2.apples.a // will return apples as array
myobj2.apples.a [0] // will return apples as array index number 0
myobj2.apples.a [1] // will return apples as array index number 1
I hope I helped you
see also
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Basics