Merge of data containers
Stefan Skoglund <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
If i want to merge a unknown number of data containers into one json
array ?
Like this:
-----
"a"
data => parsejson('{ "ifname": "lo"}');
"b"
data => parsejson('{ "ifname": "enp1"}');
"ifs"
slist => { "a", "b"};
"a_b"
data => mapdata( "json", '$(this.v)' , "ifs");
----
The last maplist doesn't work while:
----
"a_b"
data => mapdata( "json", '{ "stats": $(this.v) }' , "ifs");
---
works.
This has to do with differences in the 'ip link' tool between the one
in debian9 and debian10/debian11 (in that case i can use the json
directly from 'ip --json link show').
So how to load data from multiple datacontainers into a json array in
a data container ?
--
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/8c1c0fbd669c63da86e1ae59d7bd2b1f438ef2ae.camel%40agj.net.