function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
anil Kumaranil Kumar 

Dynamic JSON body

Hi All,

I want prepare JSON body dynamically for all the contact fields with mask values, i have queried all the contact fileds dynamically assiged to list now i have to prepare JSON body for the fields with mask values. 
For example contact name is Anil it should returm like "Name":"True",contact Phone is null it should returm like "Phone":"False"

How to achive this in apex.

Thanks,
Anil Kumar 
anil Kumaranil Kumar
And also i would like to send all contact records in the post request as JSON body.