Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Extending new keys to Map array

Certified Associate Developer

Hello everyone,

Please have a look at below code:

local!array1: {
    a!map(id: 1, name: "Name1"),
    a!map(id: 2, name: "Name2")
  },
  local!array2: a!forEach(
    items: enumerate(10),
    expression: concat("key", tostring(fv!index))
  ),

here i want to extend array1 map key from array2, which is dynamically generated through array2 and values should be the value of id from array1.

so i am expecting the new array would be like this:

{
    a!map(
      id: 1,
      name: "Name1",
      key1: 1,
      key2: 1,
      key3: 1,
      key4: 1,
      key5: 1,
      key6: 1,
      key7: 1,
      key8: 1,
      key9: 1,
      key10: 1
    ),
    a!map(
      id: 2,
      name: "Name2",
      key1: 2,
      key2: 2,
      key3: 2,
      key4: 2,
      key5: 2,
      key6: 2,
      key7: 2,
      key8: 2,
      key9: 2,
      key10: 2
    )
  }

any easiest way to do this. Thanks in advance 

  Discussion posts and replies are publicly visible