Search code examples
javascriptjqueryjsonmultidimensional-arrayalfresco

json multidimensional array from Alfresco


I am trying to consume an Alfresco api which returns information about some documents stored under a specific Alfresco directory.

My problem is that on the Json that i am getting , when I am trying to return for example the value from cmis:name I am getting an underfined error.

I managed to reach until the "properties" level but i am not able to go any further. Could you please advise me ?

Thank you in advance.

 success: function (json) {

          $.each(json, function () {
              $.each(this, function (key, value) {
                  console.log(value.object.properties);
              });
              });
      },

enter image description here


Solution

  • I found the correct way to access the last level and get the value :

    success: function (json) {
    
              $.each(json, function () {
                  $.each(this, function (key, value) {
                      console.log(value.object.properties['cmis:name'].value);
                  });
                  });
          },