+ Start a Discussion
Roman RegmiRoman Regmi 

I want to be able to put data coming in from 2 apex controllers into a single variable. How do I do that?

User-added image

The data is stored in this.imageUrl and this.itemList. I want the itemList to have an additional key value pair with key as 'url' and value as the data in imageUrl

The data in itemsList = [
{Item_Name__c: 'Chicken Momo', Price__c: 2.5, Id: 'a0C5j000000JiOIEA0'},
{Item_Name__c: 'Veg Momo', Price__c: 1.5, Id: 'a0C5j000000JiOHEA0'}

The data in imageUrl = ['/sfc/servlet.shepherd/document/download/0695j000007jP4qAAE', '/sfc/servlet.shepherd/document/download/0695j000007igi6AAA']

I want something like
temsList = [
{Item_Name__c: 'Chicken Momo', Price__c: 2.5, Id: 'a0C5j000000JiOIEA0',
{Item_Name__c: 'Veg Momo', Price__c: 1.5, Id: 'a0C5j000000JiOHEA0',