To explore a json file i use an array to stock the path to the actual location as follow: 1- path are stocked to a html data-indexs="parent,child,etc.." 2- in Javascript i use split to convert the data-indexs string into an array 3- i want to convert this array into a multiple indexs path.
function previewIndex (index)
{
var indexspath = index.split(',');
var initialindex = index;
var selected = Json_object.obj[indexspath];
var preview = '';
console.log(indexspath);
It works fin when there is only 1 element in the table // console : Array [ "features" ] But doesn't with multiple elements // console : Array [ "features", "geometry" ]
So how can i convert this second array into a path to access geometry on my object ?
Thanks for your help !