Hi all,

I have a need to merge a list of maps of lists:

heat_template_version: 2016-10-14

outputs:
  debug:
    value:
      yaql:
        # dict(vms=>dict($.vms.select([$.name, $])))
        expression: dict($.data.l.select([$.keys().toList()[0],
$.values().toList()[0]]))
        data:
          l:
            - a: [123]
            - b: [123]
            - a: [456]



I want to end up with debug as:

  a: [123, 456]
  b: [123]

Perhaps we need a map_deep_merge function, but can this be done with yaql?

I suspect it can, but can't currently figure out how the assignment to the
intermediate "a" value is supposed to work, any ideas on the cleanest
approach appreciated!

Thanks,

Steve

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to