Difference between revisions of "Widget:DCTList"

From LINKS Community Center
Jump to: navigation, search
Line 178: Line 178:
 
         const CKEY = 'children'
 
         const CKEY = 'children'
 
         const fq = '[[Category:Function_category]]' +
 
         const fq = '[[Category:Function_category]]' +
                    '|?-Subproperty_of=' + CKEY;
+
                  '|?-Subproperty_of=' + CKEY;
  
 
         const qUrl = '/api.php?action=ask&format=json&query=' + encodeURIComponent(fq);
 
         const qUrl = '/api.php?action=ask&format=json&query=' + encodeURIComponent(fq);
 
         const fRes = await fetch(qUrl).then(response => response.json());
 
         const fRes = await fetch(qUrl).then(response => response.json());
 +
 +
        const data = fRes.query.results
 +
 +
        Object.keys(data).forEach(key => {
 +
            console.log(key)
 +
        })
 
         console.log('Func result', fRes);
 
         console.log('Func result', fRes);
  

Revision as of 13:35, 30 August 2022

Development verstion of the DCT List.
Not ready for production!