"$util.escapeJavaScript($input.body)"
。下面是用于 AWS Lambda 的 Node.js 示例代码:
exports.handler = async (event) => {
const body = JSON.parse(event.body);
// Do something with the JSON array payload
const response = {
statusCode: 200,
body: JSON.stringify('Success!'),
};
return response;
};