I want to push a JSON object to my array; I tried the following code, but right now it is pushing {"fieldDataType": "test"} whereas I want to have: {"S": "test"} ("S" is what fieldDataType has);
var fieldDataType = "S";
p["KeyConditions"][terms[0].attribute]['AttributeValueList'] = [];
p["KeyConditions"][terms[0].attribute]['AttributeValueList'].push(
//{"S": terms[0].value}
{fieldDataType: terms[0].value}
);