How Can I Target JSON Parent Property?

Hello all, hope somebody can help:

From the plugins.json file, below is one plugin:

{
    "AgileIndicators": {
        "author": "aljawaid",
        "compatible_version": ">=1.2.20",
        "description": "Agile Indicators display the measurements for Task Priorities and Task Complexities in an easy to use general format. Task Priorities are scaled between P1 and P5 whilst Task Complexities are scored as 0-50.",
        "download": "https://github.com/aljawaid/AgileIndicators/releases/download/v1.0/AgileIndicators-1.0.zip",
        "has_hooks": true,
        "has_overrides": false,
        "has_schema": false,
        "homepage": "https://github.com/aljawaid/AgileIndicators",
        "is_type": "plugin",
        "last_updated": "2022-10-25",
        "license": "Unlicense",
        "readme": "https://github.com/aljawaid/AgileIndicators/blob/master/README.md",
        "remote_install": true,
        "title": "AgileIndicators",
        "version": "1.0.0"
    },
}

I want to target "AgileIndicators": which I think is the parent or namespace. How can I do it in php? I’m trying to call it to display on the Plugins Directory page within Kanboard.

shouldnt need to. title property.

That’s what I want to compare it to eventually

try key($plugin), i think that will work

<?= key($plugin) ?> in directory.php

that results in author which just confuses things more…edit… the author is the first property of the plugin… but i need the parent property (the plugin name, not title) before that

update… I tried all sorts but can’t get it to show… task abandoned i think… call me stupid but i just cant get it to work

<?= key($plugin) ?> /11
<br>
<?= key($plugin[0]) ?> /22
<br>
<?= key($plugin)[0] ?> /22
<br>

                <?php if ($is_configured): ?>
                    <?php if (! isset($installed_plugins[$plugin['title']])): ?>
                        <?= $this->url->icon('cloud-download', t('Install'), 'PluginController', 'install', array('archive_url' => urlencode($plugin['download'])), true, 'install-plugin', t('Install this plugin')) ?>
                    <?php elseif ($installed_plugins[$plugin['title']] < $plugin['version']): ?>
                        <div class="currently-installed-v pp-grey" title="<?= t('Currently Installed') ?>">
                            <?= ($installed_plugins[$plugin['title']]) ?>
                        </div>
                        <?= $this->url->icon('refresh', t('Update'), 'PluginController', 'update', array('archive_url' => urlencode($plugin['download'])), true, 'update-plugin', t('Update this plugin')) ?>
                    <?php else: ?>

<?= $available_plugins ?> /1
<br>
<?= key($available_plugins[$plugin]) ?> /2
<br>
<?= key($available_plugins)[$plugin] ?> /3
<br>
<?= key($installed_plugins)[$plugin] ?> /4
<br>
<?= key($installed_plugins[$plugin]) ?> /5
<br>
plugins
<?= var_export($plugin) ?>
<br>
...test...
<br>
<?= var_export($available_plugins[$plugin]) ?>
<br>
...test 2...
<br>
<?php $obj = key($plugin) ?>
<?= $obj[1] ?>
<br>
<?= json_decode(key($plugin)) ?>

ill play with it when i get a chance

1 Like