I am working with DynamoDB, I am extracting the information of my table "orders" correctly but I just have problems with one.
For example, if I want to get the userID, I got it correctly doing that:
String user_idp = item.get("user").getM().get("user_id").getS();
But if I want get the same for other field called provider I got java.lang.NullPointerException.
String pr = item.get("provider").getM().get("name").getS();
The error that I got is:
There was an unexpected error (type=Internal Server Error, status=500).
No message available
java.lang.NullPointerException: null
Here is the structure:
"provider": {
"address": "someadress",
"name": "somename",
"phoneNumber": somePhoneNumber,
"provider_id": "someProviderId"
}
I am missing something with DynamoDB, can you help me?
Thanks!