Skip to main content
Hi,

 

I want to show json code data into salesforce custom page.

 

I don't know how it is done.

 

If I have the following code and I save it in a Text Area field so how can I write a code and disply it on a custom page.

 

{

 

"ContactList": [

 

        {

 

            "FirstName":"BDG",

 

            "LastName": "ABC",

 

            "Email": "test1@test.com",

 

            "Mobile": "9999999999"

 

        },

 

        {

 

            "FirstName":"AGL",

 

            "LastName": "LKJ",

 

            "Email": "test2@test.com",

 

            "Mobile": "8888888888"

 

        }

 

    ]

 

}

 

Thanks in advance
2 answers
  1. Jul 8, 2020, 8:16 AM
    Hi Pranil, 

     

    the data you have received as JOSN pass to client-side (Lighting Component) then JS assign this to client-side variable as below 

     

    contactList = respoonseDate;

     

    set this contactList data to component attribute 

     

    add iteration in lighting component using the contact list and create var for iterator and access value of JSON object attribute 

     

    You can either use Aura component(Dev console can be used) and Lightning web component (required vs code)

     

    Thanks
0/9000