RESTAPIRequestBody - data

The content of the request body.

Table 1. Field
Name Type Description
data Object or Array The request content. This can be a single object or an array of objects depending on the request.

var entry;
var id;
var requestBody = request.body;
var requestData = requestBody.data; //May be an array or a single object
if (requestData instanceof Array) { 
 entry = requestData[0].name; // 'user1'
 id = requestData[0].id; // '1234'
} else {
 entry = requestData.name; // 'user1'
 id = requestData.id; // '1234'
}