I have retrieved a PHP variable session that contains a JSON object. The JSON object is the following:
var jsonObject = {
"menu":{
"intro":{
"intosub":"sub_1"
},
"vis":{
"visub":"sub_2"
}
}
};
How can I know the length of a part of this JSON object? That is, I want to know how much elements that contain the key Intro and the same with key vis.
I have reviewed some post about this issue, and I found that I have to change the structure of JSON object, but this is not possible. Is there any other way in order to do this?