Hi All, me again with a basic question
I'm getting a json response that is a null as shown below
here is the transformer i am using to get the response , how do i convert the
const data = {{GetContactDetails.data}}
// Initialize an empty array to hold final data
let finalData = [];
// Loop through each key in the data object
// Retrieve specific data points for each instance and assign to variables
let Lastname = data["a:LastName"][0];
let Firstname = data["a:FirstName"][0];
let Dob = moment(data["a:DateOfBirth"][0]).format('DD.MM.YYYY');
let Contactid = data["a:ContactId"][0] ;
let email = data["a:EmailAddress"][0];
let landline =data["a:LandlineNumber"][0];
let Mobile =data["a:MobileNumber"][0]
// Create a new object containing all relevant data points
let newObj = {
'Lastname': Lastname,
'Firstname': Firstname,
'Dob' : Dob,
'ContactId': Contactid,
'Email': email ,
'Tel' : landline,
'Mobile':Mobile
};
// Add new object to the finalData array
finalData.push(newObj);
// Log finalData to the console and return it
console.log(finalData);
return finalData;
to something more descriptive , like a text field?