I am new to DynamoDb. I am trying to access an object inside the array:
Created a new item in a table-
survey.create({
survey_name: 'Cycle',
description: 'Describe me',
test:[{
title:'hello1'
},{
title:'hello2'
}]
}, function (err, survey) {
if(err){
console.log(err)
}else{
console.log('created', survey.get('survey_name'));
}
});
I am not to able to fetch "test[n].title", getting 0 results.
survey.query('Cycle')
.filter('test.title').equals('hello2') //Tried it with test[0].title also
.exec((err,data)=>{
if(err){
console.log(err);
}
else{
console.log(data);
}
});
Also, I want to retrieve a part(json) of the item of a table ie. 'test' if its possible