Re: How to join multiple parts of one data container

"'Nick Anderson' via help-cfengine" <[email protected]> Wed, 26 Jul 2023 07:11:42 -0700 (PDT)
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
Can you post some standalone policy that reproduces the issue?

On Wednesday, July 26, 2023 at 7:42:56 AM UTC-5 [email protected] wrote:

> Hi all,
> I have big data container (more than 4K) with all debian repository, as 
> this:
> <pre>
> {
>   "debian_10": {
>     "debian": {
>       "Components": "main contrib non-free",
>       "Suites": [
>         "buster",
>         "buster-backports"
>       ],
>       "URIs": "http://deb.debian.org/debian"
>     },
>     "debian-security": {
>       "Components": "main contrib non-free",
>       "Suites": [
> ...
> </pre>
>
> I want shorting this data to server, this is running perfect:
> "myrepos" data => '[ repos[debian_12] ,  repos[debian_11] ]';
>
> But when i need more specific repository
> "myrepos" data => '[ repos[debian_10][debian] , 
>  repos[debian_10][debian-security] ]'
> I get this error:
> error: Error parsing JSON expression '[debian] , 
>  repos[debian_10][debian-security] ]': Unable to parse json data as array, 
> did not start with '['
>
> How can I access the second levels of the data container and serialize 
> them?
>
> Thanks.
> Michal Svamberg
>
>

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/af562e97-27aa-494d-b16c-485cdf1b1838n%40googlegroups.com.