I am receiving JSON from AWS DynamoDB. I am having trouble getting to the nested items.
Im trying to retrieve two fields, 'session_nr' and 'session_type_name', from this JSON:
{content={S: {"session_nr":"PG8","session_name":"Title of this session","session_type_name":"blah blah name type"},}}
This is how each record appears. So far, this is the code I have, using a AWS ScanResult:
ScanRequest scanRequest = new ScanRequest()
.withTableName("table_name")
.withFilterExpression("field = :val")
.withProjectionExpression("content")
.withExpressionAttributeValues(expressionAttributeValues);
ScanResult scanResult = client.scan(scanRequest);
for (Map<String, AttributeValue> item : scanResult.getItems()) {
System.out.println(item);
}