This is Array
response:
{
"sk": "srName",
"Name" : "John",
"pk": "srName:6666ad97-53bf-4557-8b19-a552a75edd39"
},
{
"sk": "srName",
"Name": "Brian",
"pk": "srName:7f3569b2-62aa-4ac3-a2e8-10255fdb0769"
}
]
I’m trying to write code in javascript to GET specific item from above array
GET http://localhost:3000/6666ad97-53bf-4557-8b19-a552a75edd39
response should be:
[
{
"eventId": "6666ad97-53bf-4557-8b19-a552a75edd39",
"Name" : 'Brian'
}
]
Bharath Reddy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
To get an item in a list, you have to pass in either the index or the total value of the object, which you are not.
I suggest that you vertically partition then data that each item in the list is it’s own item in DynamoDB.
https://aws.amazon.com/blogs/database/use-vertical-partitioning-to-scale-data-efficiently-in-amazon-dynamodb/