3
votes
Get values from nested JSON dictionaries in Apex
I'm the author of the libshare
JsonMapper is a utility class I wrote as part of libshare opensource package. This makes it easy to read raw json.
For ex.,
new JsonMapper(jsonStr).getString('values[0]....
2
votes
Get values from nested JSON dictionaries in Apex
Actually resolved this myself after struggling with it for far too long! Problem was that the key/value list is the first item.
// convert json of response to map
String jsonStr = feedResponse....
2
votes
Accepted
Get values from nested JSON dictionaries in Apex
When working with untyped JSON deserialization, you end up needing to do a lot of explicit typecasting.
To get at your workspaceId, you would...
// Because "values" is a JSON array, cast it ...
1
vote
Accepted
How to access an Apex Map in LWC JS
To access the first element, the access would look like this:
let firstMortageAccount = this.addressesAndMortgageAccounts[
'Address__c:{Id=a0L25000005W8rKEAS, Address_Line_1__c=Test Street, ...
1
vote
Count number of values under specific JSON key
Yes there is.
This answer was written before your edit. The general idea still applies. This answer also assumes that you have valid JSON (your example is not valid as written).
But first, don't use ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
json × 1316apex × 778
deserialize × 162
rest-api × 128
visualforce × 84
rest × 79
javascript × 74
marketing-cloud × 68
lightning-web-components × 58
api × 58
callout × 57
apexrest × 52
lightning-aura-components × 43
parser × 43
webservices × 41
map × 40
string × 36
serialization × 36
unit-test × 34
integration × 34
list × 32
wrapper-class × 29
jsongenerator × 29
httprequest × 28
parsing × 28