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
Parth SrivastavaParth Srivastava 

how to access a compond field json into a parent json

I want that when Json is getting created it has all data for account object .Bt in account Shipping address and billing address creates seperate JSON.Now i want to display account record in field type.Ex-City,street etc

Sharing Code for reference
Input: {"SFObject":"Account","PrimaryKey":"Id","PrimaryKeyValue":"0016F00002Pn55b"}

Output:"[{\"attributes\":{\"type\":\"Account\",\"url\":\"/services/data/v43.0/sobjects/Account/0016F00002Pn55bQAB\"},\"Id\":\"0016F00002Pn55bQAB\",\"IsDeleted\":false,\"Name\":\"Edge Communications\",\"Type\":\"Customer - Direct\",\"BillingStreet\":\"312 Constitution Place\\nAustin, TX 78767\\nUSA\",\"BillingCity\":\"Austin\",\"BillingState\":\"TX\",\"BillingAddress\":{\"city\":\"Austin\",\"country\":null,\"geocodeAccuracy\":null,\"latitude\":null,\"longitude\":null,\"postalCode\":null,\"state\":\"TX\",\"street\":\"312 Constitution Place\\nAustin, TX 78767\\nUSA\"},\"ShippingStreet\":\"312 Constitution Place\\nAustin, TX 78767\\nUSA\",\"ShippingAddress\":{\"city\":null,\"country\":null,\"geocodeAccuracy\":null,\"latitude\":null,\"longitude\":null,\"postalCode\":null,\"state\":null,\"street\":\"312 Constitution Place\\nAustin, TX 78767\\nUSA\"},\"Phone\":\"(512) 757-6000\",\"Fax\":\"(512) 757-9000\",\"AccountNumber\":\"CD451796\",\"Website\":\"http://edgecomm.com\",\"PhotoUrl\":\"/services/images/photo/0016F00002Pn55bQAB\",\"Sic\":\"6576\",\"Industry\":\"Electronics\",\"AnnualRevenue\":139000000,\"NumberOfEmployees\":1000,\"Ownership\":\"Public\",\"TickerSymbol\":\"EDGE\",\"Description\":\"Edge, founded in 1998, is a start-up based in Austin, TX. The company designs and manufactures a device to convert music from one digital format to another. Edge sells its product through retailers and its own website.\",\"Rating\":\"Hot\",\"OwnerId\":\"0056F00000999WQQAY\",\"CreatedDate\":\"2018-07-19T12:39:10.000+0000\",\"CreatedById\":\"0056F00000999WQQAY\",\"LastModifiedDate\":\"2018-07-19T12:39:10.000+0000\",\"LastModifiedById\":\"0056F00000999WQQAY\",\"SystemModstamp\":\"2018-07-19T12:39:10.000+0000\",\"LastViewedDate\":\"2018-07-28T12:57:30.000+0000\",\"LastReferencedDate\":\"2018-07-28T12:57:30.000+0000\",\"CleanStatus\":\"Pending\",\"CustomerPriority__c\":\"Medium\",\"SLA__c\":\"Silver\",\"Active__c\":\"Yes\",\"NumberofLocations__c\":2,\"UpsellOpportunity__c\":\"Maybe\",\"SLASerialNumber__c\":\"2657\",\"SLAExpirationDate__c\":\"2018-08-13\"}]"