← Back to team overview

dhis2-devs team mailing list archive

Re: Metadata filtering in API no longer working?

 

Thanks!

I now did this, which also works:

  var url = dhis_api_base
+'organisationUnits.json?userDataViewFallback=true';
  $.getJSON( url, function( json ) {
 console.dir(json.organisationUnits[0].name + ' has UID ' +
json.organisationUnits[0].id);
  });


On Wed, Jun 11, 2014 at 9:03 AM, Morten Olav Hansen <mortenoh@xxxxxxxxx>
wrote:

>
> On Wed, Jun 11, 2014 at 8:50 AM, Knut Staring <knutst@xxxxxxxxx> wrote:
>
>>   $.getJSON( url, function( json ) {
>> console.dir(json);
>>   });
>>
>
> $.ajax({
>   url: URL,
>   dataType: 'json'
> }).done(function(data) {
>   $.each(data.organisationUnits, function(idx) {
>     console.log("root" + idx + ": " + this.id);
>   })
> });
>
> Something like that could work, it returns an array of orgUnits
>
> --
> Morten
>



-- 
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522
http://dhis2.org

Follow ups

References